From 9be93b7991d6c1d82ba606d60bfd3b2971a60123 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Wed, 19 Feb 2020 13:04:08 +0900 Subject: Remove redundant "static" qualifier from enum declarations Nested enum types are implicitly static. Change-Id: Id3d7886087494fb67bc0d080b4a3491fb4baac19 Signed-off-by: David Pursehouse --- org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'org.eclipse.jgit.test') diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java index e839545250..5eb4e6bf21 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java @@ -341,7 +341,7 @@ public class ConfigTest { assertFalse(c.getBoolean("s", "b", true)); } - static enum TestEnum { + enum TestEnum { ONE_TWO; } -- cgit v1.2.3 From 064834d350d38f672a69947cf924f56d52bd1274 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Wed, 19 Feb 2020 13:15:43 +0900 Subject: Reorder modifiers to follow Java Language Specification The Java Language Specification recommends listing modifiers in the following order: 1. Annotations 2. public 3. protected 4. private 5. abstract 6. static 7. final 8. transient 9. volatile 10. synchronized 11. native 12. strictfp Not following this convention has no technical impact, but will reduce the code's readability because most developers are used to the standard order. This was detected using SonarLint. Change-Id: I9cddecb4f4234dae1021b677e915be23d349a380 Signed-off-by: David Pursehouse --- .../org/eclipse/jgit/http/server/ObjectFileServlet.java | 2 +- .../src/org/eclipse/jgit/lfs/CleanFilter.java | 2 +- .../src/org/eclipse/jgit/lfs/SmudgeFilter.java | 2 +- .../src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java | 2 +- .../src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java | 4 ++-- .../org/eclipse/jgit/patch/EGitPatchHistoryTest.java | 2 +- .../jgit/internal/storage/file/GcOrphanFilesTest.java | 12 ++++++------ .../eclipse/jgit/util/GitDateParserBadlyFormattedTest.java | 2 +- org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java | 2 +- .../eclipse/jgit/errors/TranslationBundleException.java | 4 ++-- .../src/org/eclipse/jgit/ignore/FastIgnoreRule.java | 2 +- .../src/org/eclipse/jgit/ignore/internal/Strings.java | 6 +++--- .../eclipse/jgit/internal/storage/dfs/DfsObjDatabase.java | 2 +- .../src/org/eclipse/jgit/internal/storage/file/GC.java | 2 +- .../org/eclipse/jgit/internal/storage/file/LockFile.java | 2 +- .../jgit/internal/storage/file/ObjectDirectory.java | 2 +- .../org/eclipse/jgit/internal/storage/file/PackFile.java | 2 +- .../eclipse/jgit/internal/storage/file/RefDirectory.java | 10 +++++----- .../org/eclipse/jgit/internal/storage/pack/PackExt.java | 2 +- .../jgit/internal/storage/reftable/BlockWriter.java | 2 +- .../jgit/internal/storage/reftable/ReftableDatabase.java | 2 +- org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java | 6 +++--- .../src/org/eclipse/jgit/lib/InflaterCache.java | 2 +- .../src/org/eclipse/jgit/lib/ObjectIdOwnerMap.java | 2 +- .../src/org/eclipse/jgit/lib/ObjectInserter.java | 2 +- .../src/org/eclipse/jgit/lib/ObjectLoader.java | 2 +- .../src/org/eclipse/jgit/lib/ObjectReader.java | 2 +- .../src/org/eclipse/jgit/lib/RebaseTodoLine.java | 2 +- org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java | 2 +- .../src/org/eclipse/jgit/lib/RepositoryCache.java | 2 +- .../src/org/eclipse/jgit/merge/MergeAlgorithm.java | 2 +- org.eclipse.jgit/src/org/eclipse/jgit/nls/NLS.java | 4 ++-- .../src/org/eclipse/jgit/patch/CombinedHunkHeader.java | 2 +- .../src/org/eclipse/jgit/storage/file/FileBasedConfig.java | 2 +- .../src/org/eclipse/jgit/transport/ReceivePack.java | 2 +- .../src/org/eclipse/jgit/transport/WalkEncryption.java | 2 +- .../src/org/eclipse/jgit/treewalk/FileTreeIterator.java | 4 ++-- .../src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java | 2 +- org.eclipse.jgit/src/org/eclipse/jgit/util/Base64.java | 12 ++++++------ org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java | 4 ++-- org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java | 2 +- org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32.java | 2 +- .../src/org/eclipse/jgit/util/FS_Win32_Cygwin.java | 2 +- org.eclipse.jgit/src/org/eclipse/jgit/util/Monitoring.java | 2 +- .../src/org/eclipse/jgit/util/RelativeDateFormatter.java | 14 +++++++------- .../src/org/eclipse/jgit/util/SystemReader.java | 2 +- 46 files changed, 75 insertions(+), 75 deletions(-) (limited to 'org.eclipse.jgit.test') diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ObjectFileServlet.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ObjectFileServlet.java index 5a27be6430..922a98addb 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ObjectFileServlet.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ObjectFileServlet.java @@ -83,7 +83,7 @@ abstract class ObjectFileServlet extends HttpServlet { } } - private static abstract class PackData extends ObjectFileServlet { + private abstract static class PackData extends ObjectFileServlet { private static final long serialVersionUID = 1L; PackData(String contentType) { diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/CleanFilter.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/CleanFilter.java index 2329ade290..27be4f6006 100644 --- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/CleanFilter.java +++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/CleanFilter.java @@ -78,7 +78,7 @@ public class CleanFilter extends FilterCommand { * The factory is responsible for creating instances of * {@link org.eclipse.jgit.lfs.CleanFilter} */ - public final static FilterCommandFactory FACTORY = CleanFilter::new; + public static final FilterCommandFactory FACTORY = CleanFilter::new; /** * Registers this filter by calling diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java index 6b30da343e..3551ee1c73 100644 --- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java +++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java @@ -92,7 +92,7 @@ public class SmudgeFilter extends FilterCommand { * The factory is responsible for creating instances of * {@link org.eclipse.jgit.lfs.SmudgeFilter} */ - public final static FilterCommandFactory FACTORY = SmudgeFilter::new; + public static final FilterCommandFactory FACTORY = SmudgeFilter::new; /** * Register this filter in JGit diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java index 85a74448f7..61cf2abc35 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java @@ -350,7 +350,7 @@ class DiffAlgorithms extends TextBuiltin { return false; } - private static abstract class Algorithm { + private abstract static class Algorithm { String name; abstract DiffAlgorithm create(); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java index 1242bb754b..73ea2a0060 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java @@ -443,7 +443,7 @@ class TextHashFunctions extends TextBuiltin { } /** Base class for any hashCode function to be tested. */ - private static abstract class Hash extends RawTextComparator { + private abstract static class Hash extends RawTextComparator { String name; @Override @@ -453,7 +453,7 @@ class TextHashFunctions extends TextBuiltin { } /** Base class for any hashCode folding function to be tested. */ - private static abstract class Fold { + private abstract static class Fold { String name; /** diff --git a/org.eclipse.jgit.test/exttst/org/eclipse/jgit/patch/EGitPatchHistoryTest.java b/org.eclipse.jgit.test/exttst/org/eclipse/jgit/patch/EGitPatchHistoryTest.java index f597f2fe3c..6a006e2896 100644 --- a/org.eclipse.jgit.test/exttst/org/eclipse/jgit/patch/EGitPatchHistoryTest.java +++ b/org.eclipse.jgit.test/exttst/org/eclipse/jgit/patch/EGitPatchHistoryTest.java @@ -185,7 +185,7 @@ public class EGitPatchHistoryTest { } } - static abstract class CommitReader { + abstract static class CommitReader { private Process proc; CommitReader(String[] args) throws IOException { diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcOrphanFilesTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcOrphanFilesTest.java index 79d72c56d0..78b830e649 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcOrphanFilesTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcOrphanFilesTest.java @@ -53,17 +53,17 @@ import org.junit.Before; import org.junit.Test; public class GcOrphanFilesTest extends GcTestCase { - private final static String PACK = "pack"; + private static final String PACK = "pack"; - private final static String BITMAP_File_1 = PACK + "-1.bitmap"; + private static final String BITMAP_File_1 = PACK + "-1.bitmap"; - private final static String IDX_File_2 = PACK + "-2.idx"; + private static final String IDX_File_2 = PACK + "-2.idx"; - private final static String IDX_File_malformed = PACK + "-1234idx"; + private static final String IDX_File_malformed = PACK + "-1234idx"; - private final static String PACK_File_2 = PACK + "-2.pack"; + private static final String PACK_File_2 = PACK + "-2.pack"; - private final static String PACK_File_3 = PACK + "-3.pack"; + private static final String PACK_File_3 = PACK + "-3.pack"; private File packDir; diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/GitDateParserBadlyFormattedTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/GitDateParserBadlyFormattedTest.java index a6af3a5143..57d2c5eddb 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/GitDateParserBadlyFormattedTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/GitDateParserBadlyFormattedTest.java @@ -79,7 +79,7 @@ public class GitDateParserBadlyFormattedTest { } @DataPoints - static public String[] getDataPoints() { + public static String[] getDataPoints() { return new String[] { "", "1970", "3000.3000.3000", "3 yesterday ago", "now yesterday ago", "yesterdays", "3.day. 2.week.ago", "day ago", "Gra Feb 21 15:35:00 2007 +0100", diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java index 834b68d6d0..ea3e2d9f83 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java @@ -90,7 +90,7 @@ import org.eclipse.jgit.transport.TagOpt; */ public class PullCommand extends TransportCommand { - private final static String DOT = "."; //$NON-NLS-1$ + private static final String DOT = "."; //$NON-NLS-1$ private ProgressMonitor monitor = NullProgressMonitor.INSTANCE; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/errors/TranslationBundleException.java b/org.eclipse.jgit/src/org/eclipse/jgit/errors/TranslationBundleException.java index 70760f36bf..6d18c7c512 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/errors/TranslationBundleException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/errors/TranslationBundleException.java @@ -78,7 +78,7 @@ public abstract class TranslationBundleException extends RuntimeException { * * @return bundle class for which the exception occurred */ - final public Class getBundleClass() { + public final Class getBundleClass() { return bundleClass; } @@ -87,7 +87,7 @@ public abstract class TranslationBundleException extends RuntimeException { * * @return locale for which the exception occurred */ - final public Locale getLocale() { + public final Locale getLocale() { return locale; } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/FastIgnoreRule.java b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/FastIgnoreRule.java index 31e173bf23..4bc926ae11 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/FastIgnoreRule.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/FastIgnoreRule.java @@ -62,7 +62,7 @@ import org.slf4j.LoggerFactory; * @since 3.6 */ public class FastIgnoreRule { - private final static Logger LOG = LoggerFactory + private static final Logger LOG = LoggerFactory .getLogger(FastIgnoreRule.class); /** diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/Strings.java b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/Strings.java index d9f4f5ae3d..132109b6cc 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/Strings.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/Strings.java @@ -233,7 +233,7 @@ public class Strings { LEADING_ASTERISK_ONLY, TRAILING_ASTERISK_ONLY, COMPLEX, NONE } - final static List POSIX_CHAR_CLASSES = Arrays.asList( + static final List POSIX_CHAR_CLASSES = Arrays.asList( "alnum", "alpha", "blank", "cntrl", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ // [:alnum:] [:alpha:] [:blank:] [:cntrl:] "digit", "graph", "lower", "print", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ @@ -248,7 +248,7 @@ public class Strings { private static final String DL = "\\p{javaDigit}\\p{javaLetter}"; //$NON-NLS-1$ - final static List JAVA_CHAR_CLASSES = Arrays + static final List JAVA_CHAR_CLASSES = Arrays .asList("\\p{Alnum}", "\\p{javaLetter}", "\\p{Blank}", "\\p{Cntrl}", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ // [:alnum:] [:alpha:] [:blank:] [:cntrl:] "\\p{javaDigit}", "[\\p{Graph}" + DL + "]", "\\p{Ll}", "[\\p{Print}" + DL + "]", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ @@ -261,7 +261,7 @@ public class Strings { // Collating symbols [[.a.]] or equivalence class expressions [[=a=]] are // not supported by CLI git (at least not by 1.9.1) - final static Pattern UNSUPPORTED = Pattern + static final Pattern UNSUPPORTED = Pattern .compile("\\[\\[[.=]\\w+[.=]\\]\\]"); //$NON-NLS-1$ /** diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjDatabase.java index df1729cde2..0ee8135faf 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjDatabase.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjDatabase.java @@ -705,7 +705,7 @@ public abstract class DfsObjDatabase extends ObjectDatabase { } /** Snapshot of packs scanned in a single pass. */ - public static abstract class PackList { + public abstract static class PackList { /** All known packs, sorted. */ public final DfsPackFile[] packs; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java index 79ba4a1b02..0619dfd83c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java @@ -131,7 +131,7 @@ import org.slf4j.LoggerFactory; * adapted to FileRepositories. */ public class GC { - private final static Logger LOG = LoggerFactory + private static final Logger LOG = LoggerFactory .getLogger(GC.class); private static final String PRUNE_EXPIRE_DEFAULT = "2.weeks.ago"; //$NON-NLS-1$ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LockFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LockFile.java index 6af41256d6..6bcd7c0703 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LockFile.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LockFile.java @@ -83,7 +83,7 @@ import org.slf4j.LoggerFactory; * name. */ public class LockFile { - private final static Logger LOG = LoggerFactory.getLogger(LockFile.class); + private static final Logger LOG = LoggerFactory.getLogger(LockFile.class); /** * Unlock the given file. diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java index 968ade6700..b4cad35ddf 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java @@ -109,7 +109,7 @@ import org.slf4j.LoggerFactory; * considered. */ public class ObjectDirectory extends FileObjectDatabase { - private final static Logger LOG = LoggerFactory + private static final Logger LOG = LoggerFactory .getLogger(ObjectDirectory.class); private static final PackList NO_PACKS = new PackList( diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java index 9b9c3a7dec..f096908eb0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java @@ -103,7 +103,7 @@ import org.slf4j.LoggerFactory; * objects are similar. */ public class PackFile implements Iterable { - private final static Logger LOG = LoggerFactory.getLogger(PackFile.class); + private static final Logger LOG = LoggerFactory.getLogger(PackFile.class); /** Sorts PackFiles to be most recently created to least recently created. */ public static final Comparator SORT = new Comparator() { @Override diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java index 7733df15f9..0cec5a4832 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java @@ -130,7 +130,7 @@ import org.slf4j.LoggerFactory; * overall size of a Git repository on disk. */ public class RefDirectory extends RefDatabase { - private final static Logger LOG = LoggerFactory + private static final Logger LOG = LoggerFactory .getLogger(RefDirectory.class); /** Magic string denoting the start of a symbolic reference file. */ @@ -1406,7 +1406,7 @@ public class RefDirectory extends RefDatabase { LooseRef peel(ObjectIdRef newLeaf); } - private final static class LoosePeeledTag extends ObjectIdRef.PeeledTag + private static final class LoosePeeledTag extends ObjectIdRef.PeeledTag implements LooseRef { private final FileSnapshot snapShot; @@ -1427,7 +1427,7 @@ public class RefDirectory extends RefDatabase { } } - private final static class LooseNonTag extends ObjectIdRef.PeeledNonTag + private static final class LooseNonTag extends ObjectIdRef.PeeledNonTag implements LooseRef { private final FileSnapshot snapShot; @@ -1448,7 +1448,7 @@ public class RefDirectory extends RefDatabase { } } - private final static class LooseUnpeeled extends ObjectIdRef.Unpeeled + private static final class LooseUnpeeled extends ObjectIdRef.Unpeeled implements LooseRef { private FileSnapshot snapShot; @@ -1483,7 +1483,7 @@ public class RefDirectory extends RefDatabase { } } - private final static class LooseSymbolicRef extends SymbolicRef implements + private static final class LooseSymbolicRef extends SymbolicRef implements LooseRef { private final FileSnapshot snapShot; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackExt.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackExt.java index 292fd368cd..b4143c900c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackExt.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackExt.java @@ -81,7 +81,7 @@ public class PackExt { * the file extension. * @return the PackExt for the ext */ - public synchronized static PackExt newPackExt(String ext) { + public static synchronized PackExt newPackExt(String ext) { PackExt[] dst = new PackExt[VALUES.length + 1]; for (int i = 0; i < VALUES.length; i++) { PackExt packExt = VALUES[i]; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/BlockWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/BlockWriter.java index b3173e838c..1ed1801678 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/BlockWriter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/BlockWriter.java @@ -286,7 +286,7 @@ class BlockWriter { return aLen - bLen; } - static abstract class Entry { + abstract static class Entry { static int compare(Entry ea, Entry eb) { byte[] a = ea.key; byte[] b = eb.key; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableDatabase.java index c08f1814dc..696347e8fe 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableDatabase.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableDatabase.java @@ -80,7 +80,7 @@ public abstract class ReftableDatabase { * @throws IOException * on I/O problems. */ - abstract protected MergedReftable openMergedReftable() throws IOException; + protected abstract MergedReftable openMergedReftable() throws IOException; /** * @return the next available logical timestamp for an additional reftable diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java index eb13bba872..cbb3e54903 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java @@ -243,11 +243,11 @@ public class IndexDiff { } } - private final static int TREE = 0; + private static final int TREE = 0; - private final static int INDEX = 1; + private static final int INDEX = 1; - private final static int WORKDIR = 2; + private static final int WORKDIR = 2; private final Repository repository; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/InflaterCache.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/InflaterCache.java index dd0f18e165..314bde2c84 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/InflaterCache.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/InflaterCache.java @@ -73,7 +73,7 @@ public class InflaterCache { return r != null ? r : new Inflater(false); } - private synchronized static Inflater getImpl() { + private static synchronized Inflater getImpl() { if (openInflaterCount > 0) { final Inflater r = inflaterCache[--openInflaterCount]; inflaterCache[openInflaterCount] = null; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdOwnerMap.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdOwnerMap.java index 74c712c46c..8730d66ecc 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdOwnerMap.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdOwnerMap.java @@ -355,7 +355,7 @@ public class ObjectIdOwnerMap } /** Type of entry stored in the {@link ObjectIdOwnerMap}. */ - public static abstract class Entry extends ObjectId { + public abstract static class Entry extends ObjectId { transient Entry next; /** diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java index 77fa1b2346..edbb4b1c86 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java @@ -98,7 +98,7 @@ public abstract class ObjectInserter implements AutoCloseable { } /** Wraps a delegate ObjectInserter. */ - public static abstract class Filter extends ObjectInserter { + public abstract static class Filter extends ObjectInserter { /** @return delegate ObjectInserter to handle all processing. */ protected abstract ObjectInserter delegate(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectLoader.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectLoader.java index 2e52f031cd..b4734210f7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectLoader.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectLoader.java @@ -333,7 +333,7 @@ public abstract class ObjectLoader { * * @since 4.10 */ - public static abstract class Filter extends ObjectLoader { + public abstract static class Filter extends ObjectLoader { /** * @return delegate ObjectLoader to handle all processing. * @since 4.10 diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java index e14fb102b7..6d544670b0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java @@ -495,7 +495,7 @@ public abstract class ObjectReader implements AutoCloseable { * * @since 4.4 */ - public static abstract class Filter extends ObjectReader { + public abstract static class Filter extends ObjectReader { /** * @return delegate ObjectReader to handle all processing. * @since 4.4 diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RebaseTodoLine.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RebaseTodoLine.java index 2ffa65c05f..f893fd1bf9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RebaseTodoLine.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RebaseTodoLine.java @@ -105,7 +105,7 @@ public class RebaseTodoLine { * @param token * @return the Action */ - static public Action parse(String token) { + public static Action parse(String token) { for (Action action : Action.values()) { if (action.token.equals(token) || action.shortToken.equals(token)) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java index 9ccd3ed1ff..eb5e139546 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java @@ -827,7 +827,7 @@ public abstract class RefUpdate { * Handle the abstraction of storing a ref update. This is because both * updating and deleting of a ref have merge testing in common. */ - private static abstract class Store { + private abstract static class Store { abstract Result execute(Result status) throws IOException; } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java index fc74f5324f..5a6063e9ab 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java @@ -66,7 +66,7 @@ import org.slf4j.LoggerFactory; * Cache of active {@link org.eclipse.jgit.lib.Repository} instances. */ public class RepositoryCache { - private final static Logger LOG = LoggerFactory + private static final Logger LOG = LoggerFactory .getLogger(RepositoryCache.class); private static final RepositoryCache cache = new RepositoryCache(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeAlgorithm.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeAlgorithm.java index a77cb4ffb9..3ff38dc331 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeAlgorithm.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeAlgorithm.java @@ -83,7 +83,7 @@ public final class MergeAlgorithm { // An special edit which acts as a sentinel value by marking the end the // list of edits - private final static Edit END_EDIT = new Edit(Integer.MAX_VALUE, + private static final Edit END_EDIT = new Edit(Integer.MAX_VALUE, Integer.MAX_VALUE); @SuppressWarnings("ReferenceEquality") diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/nls/NLS.java b/org.eclipse.jgit/src/org/eclipse/jgit/nls/NLS.java index 375cd32041..d9fb1b3a00 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/nls/NLS.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/nls/NLS.java @@ -133,8 +133,8 @@ public class NLS { return b.get(type); } - final private Locale locale; - final private ConcurrentHashMap map = new ConcurrentHashMap<>(); + private final Locale locale; + private final ConcurrentHashMap map = new ConcurrentHashMap<>(); private NLS(Locale locale) { this.locale = locale; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedHunkHeader.java b/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedHunkHeader.java index 74eec81209..244f80483a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedHunkHeader.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedHunkHeader.java @@ -58,7 +58,7 @@ import org.eclipse.jgit.util.MutableInteger; * Hunk header for a hunk appearing in a "diff --cc" style patch. */ public class CombinedHunkHeader extends HunkHeader { - private static abstract class CombinedOldImage extends OldImage { + private abstract static class CombinedOldImage extends OldImage { int nContext; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileBasedConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileBasedConfig.java index 5bb8153a58..f1ff9e6ba0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileBasedConfig.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileBasedConfig.java @@ -77,7 +77,7 @@ import org.slf4j.LoggerFactory; * The configuration file that is stored in the file of the file system. */ public class FileBasedConfig extends StoredConfig { - private final static Logger LOG = LoggerFactory + private static final Logger LOG = LoggerFactory .getLogger(FileBasedConfig.class); private final File configFile; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java index 16fbbd42f3..fab9890c7c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java @@ -2003,7 +2003,7 @@ public class ReceivePack { } /** Interface for reporting status messages. */ - static abstract class Reporter { + abstract static class Reporter { abstract void sendString(String s) throws IOException; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkEncryption.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkEncryption.java index 7a973aff34..fb8a55f1b5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkEncryption.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkEncryption.java @@ -324,7 +324,7 @@ abstract class WalkEncryption { * Base implementation of JGit symmetric encryption. Supports V2 properties * format. */ - static abstract class SymmetricEncryption extends WalkEncryption + abstract static class SymmetricEncryption extends WalkEncryption implements Keys, Vals { /** Encryption profile, root name of group of related properties. */ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/FileTreeIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/FileTreeIterator.java index 6969ae45af..5f5da58771 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/FileTreeIterator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/FileTreeIterator.java @@ -275,7 +275,7 @@ public class FileTreeIterator extends WorkingTreeIterator { /** * a singleton instance of the default FileModeStrategy */ - public final static DefaultFileModeStrategy INSTANCE = + public static final DefaultFileModeStrategy INSTANCE = new DefaultFileModeStrategy(); @Override @@ -308,7 +308,7 @@ public class FileTreeIterator extends WorkingTreeIterator { /** * a singleton instance of the default FileModeStrategy */ - public final static NoGitlinksStrategy INSTANCE = new NoGitlinksStrategy(); + public static final NoGitlinksStrategy INSTANCE = new NoGitlinksStrategy(); @Override public FileMode getMode(File f, FS.Attributes attributes) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java index 88b76f7121..7f2d5365a4 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java @@ -1180,7 +1180,7 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator { * * @since 5.0 */ - public static abstract class Entry { + public abstract static class Entry { byte[] encodedName; int encodedNameLen; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/Base64.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/Base64.java index 69f8547452..119c96e02e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/Base64.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/Base64.java @@ -28,26 +28,26 @@ import org.eclipse.jgit.internal.JGitText; */ public class Base64 { /** The equals sign (=) as a byte. */ - private final static byte EQUALS_SIGN = (byte) '='; + private static final byte EQUALS_SIGN = (byte) '='; /** Indicates equals sign in encoding. */ - private final static byte EQUALS_SIGN_DEC = -1; + private static final byte EQUALS_SIGN_DEC = -1; /** Indicates white space in encoding. */ - private final static byte WHITE_SPACE_DEC = -2; + private static final byte WHITE_SPACE_DEC = -2; /** Indicates an invalid byte during decoding. */ - private final static byte INVALID_DEC = -3; + private static final byte INVALID_DEC = -3; /** The 64 valid Base64 values. */ - private final static byte[] ENC; + private static final byte[] ENC; /** * Translates a Base64 value to either its 6-bit reconstruction value or a * negative number indicating some other meaning. The table is only 7 bits * wide, as the 8th bit is discarded during decoding. */ - private final static byte[] DEC; + private static final byte[] DEC; static { ENC = ("ABCDEFGHIJKLMNOPQRSTUVWXYZ" // //$NON-NLS-1$ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java index b6c88503b1..b2fba51d63 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java @@ -213,7 +213,7 @@ public abstract class FS { * * @since 5.1.9 */ - public final static class FileStoreAttributes { + public static final class FileStoreAttributes { private static final Duration UNDEFINED_DURATION = Duration .ofNanos(Long.MAX_VALUE); @@ -691,7 +691,7 @@ public abstract class FS { /** The auto-detected implementation selected for this operating system and JRE. */ public static final FS DETECTED = detect(); - private volatile static FSFactory factory; + private static volatile FSFactory factory; /** * Auto-detect the appropriate file system abstraction. diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java index 5c2d8277cd..79c095fc10 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java @@ -85,7 +85,7 @@ import org.slf4j.LoggerFactory; * @since 3.0 */ public class FS_POSIX extends FS { - private final static Logger LOG = LoggerFactory.getLogger(FS_POSIX.class); + private static final Logger LOG = LoggerFactory.getLogger(FS_POSIX.class); private static final int DEFAULT_UMASK = 0022; private volatile int umask = -1; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32.java index 1e64a38bb1..aedf43c9e1 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32.java @@ -72,7 +72,7 @@ import org.slf4j.LoggerFactory; * @since 3.0 */ public class FS_Win32 extends FS { - private final static Logger LOG = LoggerFactory.getLogger(FS_Win32.class); + private static final Logger LOG = LoggerFactory.getLogger(FS_Win32.class); /** * Constructor diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java index ac3248cb63..10be26f797 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java @@ -65,7 +65,7 @@ import org.slf4j.LoggerFactory; * @since 3.0 */ public class FS_Win32_Cygwin extends FS_Win32 { - private final static Logger LOG = LoggerFactory + private static final Logger LOG = LoggerFactory .getLogger(FS_Win32_Cygwin.class); private static String cygpath; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/Monitoring.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/Monitoring.java index 83bf695f70..cd2a8e672d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/Monitoring.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/Monitoring.java @@ -33,7 +33,7 @@ import org.slf4j.LoggerFactory; * @since 5.1.13 */ public class Monitoring { - private final static Logger LOG = LoggerFactory.getLogger(Monitoring.class); + private static final Logger LOG = LoggerFactory.getLogger(Monitoring.class); /** * Register a MBean with the platform MBean server diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/RelativeDateFormatter.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/RelativeDateFormatter.java index 83c60c63bc..55f39c265d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/RelativeDateFormatter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/RelativeDateFormatter.java @@ -52,19 +52,19 @@ import org.eclipse.jgit.internal.JGitText; * in the format defined by {@code git log --relative-date}. */ public class RelativeDateFormatter { - final static long SECOND_IN_MILLIS = 1000; + static final long SECOND_IN_MILLIS = 1000; - final static long MINUTE_IN_MILLIS = 60 * SECOND_IN_MILLIS; + static final long MINUTE_IN_MILLIS = 60 * SECOND_IN_MILLIS; - final static long HOUR_IN_MILLIS = 60 * MINUTE_IN_MILLIS; + static final long HOUR_IN_MILLIS = 60 * MINUTE_IN_MILLIS; - final static long DAY_IN_MILLIS = 24 * HOUR_IN_MILLIS; + static final long DAY_IN_MILLIS = 24 * HOUR_IN_MILLIS; - final static long WEEK_IN_MILLIS = 7 * DAY_IN_MILLIS; + static final long WEEK_IN_MILLIS = 7 * DAY_IN_MILLIS; - final static long MONTH_IN_MILLIS = 30 * DAY_IN_MILLIS; + static final long MONTH_IN_MILLIS = 30 * DAY_IN_MILLIS; - final static long YEAR_IN_MILLIS = 365 * DAY_IN_MILLIS; + static final long YEAR_IN_MILLIS = 365 * DAY_IN_MILLIS; /** * Get age of given {@link java.util.Date} compared to now formatted in the diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java index e16a88655c..87ce4752b7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java @@ -85,7 +85,7 @@ import org.slf4j.LoggerFactory; */ public abstract class SystemReader { - private final static Logger LOG = LoggerFactory + private static final Logger LOG = LoggerFactory .getLogger(SystemReader.class); private static final SystemReader DEFAULT; -- cgit v1.2.3