Remove TrackingId class
The only portion of this class which was still used was an int constant. Move that to be a private constant in the class where it's used. Change-Id: I781032d09ce6020cccf66532869c15471a0c0fa7
This commit is contained in:
committed by
David Pursehouse
parent
5de2be720f
commit
0c51be4a54
@@ -15,7 +15,6 @@
|
||||
package com.google.gerrit.server.config;
|
||||
|
||||
import com.google.common.flogger.FluentLogger;
|
||||
import com.google.gerrit.reviewdb.client.TrackingId;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
import com.google.inject.Singleton;
|
||||
@@ -33,6 +32,8 @@ import org.eclipse.jgit.lib.Config;
|
||||
public class TrackingFootersProvider implements Provider<TrackingFooters> {
|
||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||
|
||||
private static final int MAX_LENGTH = 10;
|
||||
|
||||
private static String TRACKING_ID_TAG = "trackingid";
|
||||
private static String FOOTER_TAG = "footer";
|
||||
private static String SYSTEM_TAG = "system";
|
||||
@@ -59,11 +60,11 @@ public class TrackingFootersProvider implements Provider<TrackingFooters> {
|
||||
configValid = false;
|
||||
logger.atSevere().log(
|
||||
"Missing %s.%s.%s in gerrit.config", TRACKING_ID_TAG, name, SYSTEM_TAG);
|
||||
} else if (system.length() > TrackingId.TRACKING_SYSTEM_MAX_CHAR) {
|
||||
} else if (system.length() > MAX_LENGTH) {
|
||||
configValid = false;
|
||||
logger.atSevere().log(
|
||||
"String too long \"%s\" in gerrit.config %s.%s.%s (max %d char)",
|
||||
system, TRACKING_ID_TAG, name, SYSTEM_TAG, TrackingId.TRACKING_SYSTEM_MAX_CHAR);
|
||||
system, TRACKING_ID_TAG, name, SYSTEM_TAG, MAX_LENGTH);
|
||||
}
|
||||
|
||||
String match = cfg.getString(TRACKING_ID_TAG, name, REGEX_TAG);
|
||||
|
||||
Reference in New Issue
Block a user