Merge branch 'stable-2.16' into stable-3.0

* stable-2.16:
  ChangeNotificationsIT: Fix eclipse warning(s) about static use
  CacheMetrics: Make F_NAME a final constant in class scope
  Fix more cases where Collection.isEmpty() should be used
  Use Set instead of EnumSet in method signatures
  Replace negation of anyMatch() with noneMatch()
  AllExternalIds: Replace lambdas with method references
  PostReview: Replace filter and findFirst with anyMatch
  XContentBuilder: Use UTF_8 from Java's StandardCharsets rather than Guava
  Update git submodules
  Update git submodules
  Update git submodules
  QueryDocumentationExecutor: Make WEIGHTS final and use ImmutableMap
  BooleanProjectConfigTransformations: Make MAPPER final
  TestSubmitRuleInfo: Make INSTANCE final
  TrackingFootersProvider: Make constants final
  ChangeCleanupConfig: Make constants final
  SetParent: Simplify lambda expression
  ProjectsConsistencyChecker: Simplify lambda expression
  Remove redundant null checks used with "instanceof"
  Remove unnecessary array creation for varargs parameters
  Remove redundant parentheses in lambda statements
  PreferencesBox: Remove unnecessary boxing to Boolean
  GitwebServlet: Rename bufferSize to BUFFER_SIZE and make static
  GetPatch: Make FILE_NOT_FOUND static
  DeleteZombieCommentsRefs: Make constants static
  AbstractNotificationTest: Make constants static and rename
  TabFile: Make TRIM final
  Remove redundant calls to toString()
  OpenIdServiceImpl: Fix incorrect null comparison of Optional
  Consistently use isEmpty to check for empty collection
  PageLinks: Reuse ADMIN_PROJECTS constant
  PageLinks: Fix typo in method name
  FlushCaches: Use isEmpty to check for empty list
  JGitMetricModule: Replace anonymous Supplier instances with method references
  Adapt to deprecation of WindowCacheStats methods in JGit
  Documentation: Fix collapsed words and broken link

Change-Id: I136c109013a8947ba530a52164e97af2775fe490
This commit is contained in:
Marco Miller
2020-02-19 13:01:03 -05:00
52 changed files with 228 additions and 261 deletions

View File

@@ -25,12 +25,12 @@ import org.eclipse.jgit.lib.Config;
@Singleton
public class ChangeCleanupConfig {
private static String SECTION = "changeCleanup";
private static String KEY_ABANDON_AFTER = "abandonAfter";
private static String KEY_ABANDON_IF_MERGEABLE = "abandonIfMergeable";
private static String KEY_ABANDON_MESSAGE = "abandonMessage";
private static String KEY_CLEANUP_ACCOUNT_PATCH_REVIEW = "cleanupAccountPatchReview";
private static String DEFAULT_ABANDON_MESSAGE =
private static final String SECTION = "changeCleanup";
private static final String KEY_ABANDON_AFTER = "abandonAfter";
private static final String KEY_ABANDON_IF_MERGEABLE = "abandonIfMergeable";
private static final String KEY_ABANDON_MESSAGE = "abandonMessage";
private static final String KEY_CLEANUP_ACCOUNT_PATCH_REVIEW = "cleanupAccountPatchReview";
private static final String DEFAULT_ABANDON_MESSAGE =
"Auto-Abandoned due to inactivity, see "
+ "${URL}\n"
+ "\n"

View File

@@ -34,10 +34,10 @@ public class TrackingFootersProvider implements Provider<TrackingFooters> {
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";
private static String REGEX_TAG = "match";
private static final String TRACKING_ID_TAG = "trackingid";
private static final String FOOTER_TAG = "footer";
private static final String SYSTEM_TAG = "system";
private static final String REGEX_TAG = "match";
private final List<TrackingFooter> trackingFooters = new ArrayList<>();
@Inject