diff options
author | Shawn Pearce <sop@google.com> | 2014-11-10 15:35:20 -0800 |
---|---|---|
committer | Shawn Pearce <sop@google.com> | 2014-11-10 15:35:20 -0800 |
commit | 0cf902e47370bfb5360f6d5b46bc14e203f37d71 (patch) | |
tree | c6cdaabca9260efb887e6bed1b0fde9c4e717116 | |
parent | 9597c41ea9db20d769f7b8c54eafa207824e5bd6 (diff) | |
download | jgit-0cf902e47370bfb5360f6d5b46bc14e203f37d71.tar.gz jgit-0cf902e47370bfb5360f6d5b46bc14e203f37d71.zip |
Expand wildcard imports to specfic classes
JGit style is to import exactly the classes required, and never
to use "import foo.*" as the foo package could add new classes
in the future which are conflicting/confusing with the imports
already used by a source file.
Change-Id: I5693408c777e5843ec65fff1163d5d717849fa34
10 files changed, 56 insertions, 42 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ArchiveCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ArchiveCommandTest.java index d85fb54720..8cdf6a6c0d 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ArchiveCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ArchiveCommandTest.java @@ -45,6 +45,14 @@ package org.eclipse.jgit.api; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; +import java.io.IOException; +import java.io.OutputStream; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + import org.eclipse.jgit.api.errors.GitAPIException; import org.eclipse.jgit.junit.RepositoryTestCase; import org.eclipse.jgit.lib.FileMode; @@ -54,10 +62,6 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; -import java.io.IOException; -import java.io.OutputStream; -import java.util.*; - public class ArchiveCommandTest extends RepositoryTestCase { private static final String UNEXPECTED_ARCHIVE_SIZE = "Unexpected archive size"; diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/ignore/BasicRuleTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/ignore/BasicRuleTest.java index 2349b55c64..d8a6174475 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/ignore/BasicRuleTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/ignore/BasicRuleTest.java @@ -42,9 +42,11 @@ */ package org.eclipse.jgit.ignore; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertTrue; -import org.eclipse.jgit.ignore.FastIgnoreRule; import org.junit.Test; public class BasicRuleTest { diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/ignore/FastIgnoreRuleTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/ignore/FastIgnoreRuleTest.java index dab4e351a3..656ba446d5 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/ignore/FastIgnoreRuleTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/ignore/FastIgnoreRuleTest.java @@ -43,16 +43,18 @@ package org.eclipse.jgit.ignore; import static org.eclipse.jgit.ignore.internal.Strings.split; -import static org.junit.Assert.*; -import static org.junit.Assume.*; +import static org.junit.Assert.assertArrayEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; +import static org.junit.Assume.assumeFalse; +import static org.junit.Assume.assumeTrue; import java.util.Arrays; -import org.eclipse.jgit.ignore.FastIgnoreRule; -import org.eclipse.jgit.ignore.IgnoreRule; import org.junit.Test; import org.junit.runner.RunWith; -import org.junit.runners.*; +import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameter; import org.junit.runners.Parameterized.Parameters; diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/ignore/IgnoreMatcherParametrizedTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/ignore/IgnoreMatcherParametrizedTest.java index a51582ab3d..48649d6aee 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/ignore/IgnoreMatcherParametrizedTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/ignore/IgnoreMatcherParametrizedTest.java @@ -42,15 +42,14 @@ */ package org.eclipse.jgit.ignore; -import static org.junit.Assert.*; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import java.util.Arrays; -import org.eclipse.jgit.ignore.FastIgnoreRule; -import org.eclipse.jgit.ignore.IgnoreRule; import org.junit.Test; import org.junit.runner.RunWith; -import org.junit.runners.*; +import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameter; import org.junit.runners.Parameterized.Parameters; diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/ignore/IgnoreRuleSpecialCasesTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/ignore/IgnoreRuleSpecialCasesTest.java index 41180e70c2..109f28dabc 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/ignore/IgnoreRuleSpecialCasesTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/ignore/IgnoreRuleSpecialCasesTest.java @@ -43,16 +43,14 @@ */ package org.eclipse.jgit.ignore; -import static org.junit.Assert.*; -import static org.junit.Assume.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assume.assumeTrue; import java.util.Arrays; -import org.eclipse.jgit.ignore.FastIgnoreRule; -import org.eclipse.jgit.ignore.IgnoreRule; import org.junit.Test; import org.junit.runner.RunWith; -import org.junit.runners.*; +import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameter; import org.junit.runners.Parameterized.Parameters; diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/StoredBitmapTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/StoredBitmapTest.java index 0adf3e476c..18c9ba5b07 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/StoredBitmapTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/StoredBitmapTest.java @@ -43,14 +43,14 @@ package org.eclipse.jgit.internal.storage.file; -import static org.junit.Assert.*; - -import com.googlecode.javaewah.EWAHCompressedBitmap; +import static org.junit.Assert.assertEquals; import org.eclipse.jgit.internal.storage.file.BasePackBitmapIndex.StoredBitmap; import org.eclipse.jgit.lib.ObjectId; import org.junit.Test; +import com.googlecode.javaewah.EWAHCompressedBitmap; + public class StoredBitmapTest { @Test diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkShallowTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkShallowTest.java index 3e45d2eb9e..6df36e78f1 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkShallowTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkShallowTest.java @@ -43,14 +43,14 @@ package org.eclipse.jgit.revwalk; +import static org.junit.Assert.assertNull; + import java.io.File; import java.io.IOException; import org.eclipse.jgit.junit.JGitTestUtil; -import org.eclipse.jgit.lib.*; -import org.junit.*; - -import static org.junit.Assert.*; +import org.eclipse.jgit.lib.ObjectId; +import org.junit.Test; public class RevWalkShallowTest extends RevWalkTestCase { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java index 2ca8422fe4..08e41e4b0e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java @@ -42,17 +42,7 @@ */ package org.eclipse.jgit.api; -import org.eclipse.jgit.api.errors.GitAPIException; -import org.eclipse.jgit.api.errors.JGitInternalException; -import org.eclipse.jgit.api.errors.RefNotFoundException; -import org.eclipse.jgit.errors.IncorrectObjectTypeException; -import org.eclipse.jgit.errors.MissingObjectException; -import org.eclipse.jgit.internal.JGitText; -import org.eclipse.jgit.lib.Constants; -import org.eclipse.jgit.lib.ObjectId; -import org.eclipse.jgit.lib.Ref; -import org.eclipse.jgit.lib.Repository; -import org.eclipse.jgit.revwalk.*; +import static org.eclipse.jgit.lib.Constants.R_TAGS; import java.io.IOException; import java.text.MessageFormat; @@ -63,7 +53,20 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import static org.eclipse.jgit.lib.Constants.R_TAGS; +import org.eclipse.jgit.api.errors.GitAPIException; +import org.eclipse.jgit.api.errors.JGitInternalException; +import org.eclipse.jgit.api.errors.RefNotFoundException; +import org.eclipse.jgit.errors.IncorrectObjectTypeException; +import org.eclipse.jgit.errors.MissingObjectException; +import org.eclipse.jgit.internal.JGitText; +import org.eclipse.jgit.lib.Constants; +import org.eclipse.jgit.lib.ObjectId; +import org.eclipse.jgit.lib.Ref; +import org.eclipse.jgit.lib.Repository; +import org.eclipse.jgit.revwalk.RevCommit; +import org.eclipse.jgit.revwalk.RevFlag; +import org.eclipse.jgit.revwalk.RevFlagSet; +import org.eclipse.jgit.revwalk.RevWalk; /** * Given a commit, show the most recent tag that is reachable from a commit. diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/PathMatcher.java b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/PathMatcher.java index 753971ed40..830aab1cff 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/PathMatcher.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/PathMatcher.java @@ -42,9 +42,13 @@ */ package org.eclipse.jgit.ignore.internal; -import static org.eclipse.jgit.ignore.internal.Strings.*; +import static org.eclipse.jgit.ignore.internal.Strings.count; +import static org.eclipse.jgit.ignore.internal.Strings.getPathSeparator; +import static org.eclipse.jgit.ignore.internal.Strings.isWildCard; +import static org.eclipse.jgit.ignore.internal.Strings.split; -import java.util.*; +import java.util.ArrayList; +import java.util.List; import org.eclipse.jgit.errors.InvalidPatternException; import org.eclipse.jgit.ignore.FastIgnoreRule; 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 e9b300760a..c694a14566 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 @@ -44,7 +44,9 @@ package org.eclipse.jgit.ignore.internal; import static java.lang.Character.isLetter; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; import java.util.regex.Pattern; import org.eclipse.jgit.errors.InvalidPatternException; |