diff options
Diffstat (limited to 'tests/src/cgeo/geocaching/sorting/NameComparatorTest.java')
-rw-r--r-- | tests/src/cgeo/geocaching/sorting/NameComparatorTest.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/src/cgeo/geocaching/sorting/NameComparatorTest.java b/tests/src/cgeo/geocaching/sorting/NameComparatorTest.java index 533135d..6d4fa46 100644 --- a/tests/src/cgeo/geocaching/sorting/NameComparatorTest.java +++ b/tests/src/cgeo/geocaching/sorting/NameComparatorTest.java @@ -18,7 +18,7 @@ public class NameComparatorTest extends AndroidTestCase { } } - private NameComparator comp = new NameComparator(); + private final NameComparator comp = new NameComparator(); public void testLexical() { assertSorted(new NamedCache("A"), new NamedCache("Z")); @@ -38,11 +38,10 @@ public class NameComparatorTest extends AndroidTestCase { /** * Assert that a given collection of names is already sorted correctly. * - * @param names */ - private void assertSortedNames(String... names) { - ArrayList<Geocache> caches = new ArrayList<Geocache>(names.length); - for (String name : names) { + private void assertSortedNames(final String... names) { + final ArrayList<Geocache> caches = new ArrayList<Geocache>(names.length); + for (final String name : names) { caches.add(new NamedCache(name)); } Collections.sort(caches, comp); |