summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-common/src
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2014-04-10 11:43:11 +1000
committerOlivier Lamy <olamy@apache.org>2014-04-10 11:43:11 +1000
commitd9de8dc7afe4a1e22257a9437d68649eee8f3047 (patch)
tree89e49278beea7304252fd217a35a865986647a44 /archiva-modules/archiva-base/archiva-common/src
parentff99d5a203756c31bcf4a8a98ec4c25cb423ad74 (diff)
downloadarchiva-d9de8dc7afe4a1e22257a9437d68649eee8f3047.tar.gz
archiva-d9de8dc7afe4a1e22257a9437d68649eee8f3047.zip
use diamond operator
Diffstat (limited to 'archiva-modules/archiva-base/archiva-common/src')
-rw-r--r--archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/common/utils/VersionComparator.java4
-rw-r--r--archiva-modules/archiva-base/archiva-common/src/test/java/org/apache/archiva/common/utils/VersionComparatorTest.java6
2 files changed, 5 insertions, 5 deletions
diff --git a/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/common/utils/VersionComparator.java b/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/common/utils/VersionComparator.java
index 73d0cd752..bbdbbd3b7 100644
--- a/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/common/utils/VersionComparator.java
+++ b/archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/common/utils/VersionComparator.java
@@ -60,7 +60,7 @@ public class VersionComparator
public VersionComparator()
{
- specialWords = new ArrayList<String>( 23 );
+ specialWords = new ArrayList<>( 23 );
// ids that refer to LATEST
specialWords.add( "final" );
@@ -204,7 +204,7 @@ public class VersionComparator
int modeDigit = 1;
int modeText = 2;
- List<String> parts = new ArrayList<String>();
+ List<String> parts = new ArrayList<>();
int len = version.length();
int i = 0;
int start = 0;
diff --git a/archiva-modules/archiva-base/archiva-common/src/test/java/org/apache/archiva/common/utils/VersionComparatorTest.java b/archiva-modules/archiva-base/archiva-common/src/test/java/org/apache/archiva/common/utils/VersionComparatorTest.java
index 59e9dde72..d21d5fe4e 100644
--- a/archiva-modules/archiva-base/archiva-common/src/test/java/org/apache/archiva/common/utils/VersionComparatorTest.java
+++ b/archiva-modules/archiva-base/archiva-common/src/test/java/org/apache/archiva/common/utils/VersionComparatorTest.java
@@ -19,13 +19,13 @@ package org.apache.archiva.common.utils;
* under the License.
*/
+import junit.framework.TestCase;
+
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
-import junit.framework.TestCase;
-
/**
* VersionComparatorTest
*
@@ -97,7 +97,7 @@ public class VersionComparatorTest
private void assertSort( String[] rawVersions, String[] expectedSort )
{
- List<String> versions = new ArrayList<String>();
+ List<String> versions = new ArrayList<>();
versions.addAll( Arrays.asList( rawVersions ) );
Collections.sort( versions, VersionComparator.getInstance() );