]> source.dussan.org Git - jgit.git/commitdiff
GitDateParser#ParseableSimpleDateFormat: Make formatStr private final 46/144146/2
authorDavid Pursehouse <david.pursehouse@gmail.com>
Sun, 16 Jun 2019 04:54:31 +0000 (13:54 +0900)
committerDavid Pursehouse <david.pursehouse@gmail.com>
Sun, 16 Jun 2019 23:18:12 +0000 (08:18 +0900)
ParseableSimpleDateFormat is an enum, and enums must be immutable,
hence the member should be final. At the same time, make it private
since it does not need to be publicly visible.

Change-Id: I7e181f591038d556f1123b6e37adf8441059e99a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
org.eclipse.jgit/src/org/eclipse/jgit/util/GitDateParser.java

index a339b9aba0d1f2d9c841e25eece3141b1d5ae3f1..56a173163dd0a021a35d6252b5042404ee18a074 100644 (file)
@@ -126,7 +126,7 @@ public class GitDateParser {
                DEFAULT("EEE MMM dd HH:mm:ss yyyy Z"), // //$NON-NLS-1$
                LOCAL("EEE MMM dd HH:mm:ss yyyy"); //$NON-NLS-1$
 
-               String formatStr;
+               private final String formatStr;
 
                private ParseableSimpleDateFormat(String formatStr) {
                        this.formatStr = formatStr;