diff options
author | Antoine Musso <hashar@free.fr> | 2023-06-09 14:03:27 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2023-06-09 16:40:35 +0200 |
commit | c7960910f0baa0fe7e5b7e24e8681afeffea22a0 (patch) | |
tree | fb37097cb639aac74ac181835081495e45fcbbb0 | |
parent | ff4caff26ad4895e382a67ca92efae5757ca02cf (diff) | |
download | jgit-c7960910f0baa0fe7e5b7e24e8681afeffea22a0.tar.gz jgit-c7960910f0baa0fe7e5b7e24e8681afeffea22a0.zip |
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
-rw-r--r-- | org.eclipse.jgit/.settings/.api_filters | 14 | ||||
-rw-r--r-- | org.eclipse.jgit/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 @@ </message_arguments> </filter> </resource> + <resource path="src/org/eclipse/jgit/lib/Constants.java" type="org.eclipse.jgit.lib.Constants"> + <filter id="388100214"> + <message_arguments> + <message_argument value="org.eclipse.jgit.lib.Constants"/> + <message_argument value="COMMIT_GENERATION_NOT_COMPUTED"/> + </message_arguments> + </filter> + <filter id="388100214"> + <message_arguments> + <message_argument value="org.eclipse.jgit.lib.Constants"/> + <message_argument value="COMMIT_GENERATION_UNKNOWN"/> + </message_arguments> + </filter> + </resource> <resource path="src/org/eclipse/jgit/revwalk/RevCommit.java" type="org.eclipse.jgit.revwalk.RevCommit"> <filter id="1193279491"> <message_arguments> 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 |