CachedPreferences: Remove obsolete call to PreferencesParser#parse

Release-Notes: skip
Google-Bug-Id: b/353555340
Change-Id: I04f7bf6c28aa3a53ef8c203bac9c6fcffae40f06
diff --git a/java/com/google/gerrit/server/config/CachedPreferences.java b/java/com/google/gerrit/server/config/CachedPreferences.java
index 309d1fd..3b013c0 100644
--- a/java/com/google/gerrit/server/config/CachedPreferences.java
+++ b/java/com/google/gerrit/server/config/CachedPreferences.java
@@ -126,10 +126,8 @@
       CachedPreferencesProto userPreferencesProto = userPreferences.config();
       switch (userPreferencesProto.getPreferencesCase()) {
         case USER_PREFERENCES:
-          PreferencesT pref =
-              preferencesParser.fromUserPreferences(
-                  userPreferencesProto.getUserPreferences(), configOrNull(defaultPreferences));
-          return preferencesParser.parse(pref, configOrNull(defaultPreferences));
+          return preferencesParser.fromUserPreferences(
+              userPreferencesProto.getUserPreferences(), configOrNull(defaultPreferences));
         case LEGACY_GIT_CONFIG:
           return preferencesParser.parse(
               userPreferences.asConfig(), configOrNull(defaultPreferences), null);
diff --git a/java/com/google/gerrit/server/config/PreferencesParserUtil.java b/java/com/google/gerrit/server/config/PreferencesParserUtil.java
index 9249b3c..3e39e25 100644
--- a/java/com/google/gerrit/server/config/PreferencesParserUtil.java
+++ b/java/com/google/gerrit/server/config/PreferencesParserUtil.java
@@ -324,8 +324,6 @@
     T parse(Config cfg, @Nullable Config defaultConfig, @Nullable T input)
         throws ConfigInvalidException;
 
-    T parse(T cfg, @Nullable Config defaultConfig) throws ConfigInvalidException;
-
     T fromUserPreferences(UserPreferences userPreferences, @Nullable Config defaultCfg)
         throws ConfigInvalidException;
 
@@ -347,12 +345,6 @@
     }
 
     @Override
-    public GeneralPreferencesInfo parse(GeneralPreferencesInfo cfg, @Nullable Config defaultCfg)
-        throws ConfigInvalidException {
-      return PreferencesParserUtil.parseGeneralPreferences(cfg, defaultCfg);
-    }
-
-    @Override
     public GeneralPreferencesInfo fromUserPreferences(
         UserPreferences p, @Nullable Config defaultCfg) throws ConfigInvalidException {
       return PreferencesParserUtil.parseGeneralPreferences(
@@ -379,12 +371,6 @@
     }
 
     @Override
-    public EditPreferencesInfo parse(EditPreferencesInfo cfg, @Nullable Config defaultCfg)
-        throws ConfigInvalidException {
-      return PreferencesParserUtil.parseEditPreferences(cfg, defaultCfg);
-    }
-
-    @Override
     public EditPreferencesInfo fromUserPreferences(UserPreferences p, @Nullable Config defaultCfg)
         throws ConfigInvalidException {
       return PreferencesParserUtil.parseEditPreferences(
@@ -411,12 +397,6 @@
     }
 
     @Override
-    public DiffPreferencesInfo parse(DiffPreferencesInfo cfg, @Nullable Config defaultCfg)
-        throws ConfigInvalidException {
-      return PreferencesParserUtil.parseDiffPreferences(cfg, defaultCfg);
-    }
-
-    @Override
     public DiffPreferencesInfo fromUserPreferences(UserPreferences p, @Nullable Config defaultCfg)
         throws ConfigInvalidException {
       return PreferencesParserUtil.parseDiffPreferences(