From c7960910f0baa0fe7e5b7e24e8681afeffea22a0 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Fri, 9 Jun 2023 14:03:27 +0200 Subject: [PATCH] Mark COMMIT_GENERATION_* constants final In org.eclipse.jgit.lib.Constants the constants are all marked final with the exception of: - COMMIT_GENERATION_UNKOWN - COMMIT_GENERATION_NOT_COMPUTED They were introduced by cf70e7cbe4f without the `final` keyword while other constants have it which certainly has been forgotten. The javadoc `{@value}` tag causes raises a warning about the fields not being constants which is how I have discovered the ommission. Change-Id: I0ad87f42355440c7d50158e773a280a0526e9671 --- org.eclipse.jgit/.settings/.api_filters | 14 ++++++++++++++ .../src/org/eclipse/jgit/lib/Constants.java | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/org.eclipse.jgit/.settings/.api_filters b/org.eclipse.jgit/.settings/.api_filters index 75697fd88a..542928a2f8 100644 --- a/org.eclipse.jgit/.settings/.api_filters +++ b/org.eclipse.jgit/.settings/.api_filters @@ -22,6 +22,20 @@ + + + + + + + + + + + + + + diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java index 0b8bf8c6c5..3b2ef42bbe 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java @@ -766,7 +766,7 @@ public final class Constants { * * @since 6.5 */ - public static int COMMIT_GENERATION_UNKNOWN = Integer.MAX_VALUE; + public static final int COMMIT_GENERATION_UNKNOWN = Integer.MAX_VALUE; /** * If a commit-graph file was written by a version of Git that did not @@ -775,7 +775,7 @@ public final class Constants { * * @since 6.5 */ - public static int COMMIT_GENERATION_NOT_COMPUTED = 0; + public static final int COMMIT_GENERATION_NOT_COMPUTED = 0; private Constants() { // Hide the default constructor -- 2.39.5