]> source.dussan.org Git - jgit.git/commitdiff
Mark COMMIT_GENERATION_* constants final 50/202450/2
authorAntoine Musso <hashar@free.fr>
Fri, 9 Jun 2023 12:03:27 +0000 (14:03 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Fri, 9 Jun 2023 14:40:35 +0000 (16:40 +0200)
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
org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java

index 75697fd88a882eebb6fb1f50973acb6fc2b8f086..542928a2f8e057091f54fa67fd51ebe8079f289b 100644 (file)
             </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>
index 0b8bf8c6c51c0384e0587d565d596f089f917396..3b2ef42bbec19e145233dfb5661a689a13080d43 100644 (file)
@@ -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