summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-checksum/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-checksum/src
parentff99d5a203756c31bcf4a8a98ec4c25cb423ad74 (diff)
downloadarchiva-d9de8dc7afe4a1e22257a9437d68649eee8f3047.tar.gz
archiva-d9de8dc7afe4a1e22257a9437d68649eee8f3047.zip
use diamond operator
Diffstat (limited to 'archiva-modules/archiva-base/archiva-checksum/src')
-rw-r--r--archiva-modules/archiva-base/archiva-checksum/src/main/java/org/apache/archiva/checksum/ChecksummedFile.java6
-rw-r--r--archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksumTest.java2
2 files changed, 3 insertions, 5 deletions
diff --git a/archiva-modules/archiva-base/archiva-checksum/src/main/java/org/apache/archiva/checksum/ChecksummedFile.java b/archiva-modules/archiva-base/archiva-checksum/src/main/java/org/apache/archiva/checksum/ChecksummedFile.java
index b505494d2..9e9378e3b 100644
--- a/archiva-modules/archiva-base/archiva-checksum/src/main/java/org/apache/archiva/checksum/ChecksummedFile.java
+++ b/archiva-modules/archiva-base/archiva-checksum/src/main/java/org/apache/archiva/checksum/ChecksummedFile.java
@@ -20,14 +20,12 @@ package org.apache.archiva.checksum;
*/
import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@@ -143,7 +141,7 @@ public class ChecksummedFile
try (FileInputStream fis = new FileInputStream( referenceFile ))
{
- List<Checksum> checksums = new ArrayList<Checksum>( algorithms.length );
+ List<Checksum> checksums = new ArrayList<>( algorithms.length );
// Create checksum object for each algorithm.
for ( ChecksumAlgorithm checksumAlgorithm : algorithms )
{
@@ -215,7 +213,7 @@ public class ChecksummedFile
*/
public boolean fixChecksums( ChecksumAlgorithm[] algorithms )
{
- List<Checksum> checksums = new ArrayList<Checksum>( algorithms.length );
+ List<Checksum> checksums = new ArrayList<>( algorithms.length );
// Create checksum object for each algorithm.
for ( ChecksumAlgorithm checksumAlgorithm : algorithms )
{
diff --git a/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksumTest.java b/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksumTest.java
index 7f66f16d4..11df7b9b5 100644
--- a/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksumTest.java
+++ b/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksumTest.java
@@ -71,7 +71,7 @@ public class ChecksumTest
{
Checksum checksumSha1 = new Checksum( ChecksumAlgorithm.SHA1 );
Checksum checksumMd5 = new Checksum( ChecksumAlgorithm.MD5 );
- List<Checksum> checksums = new ArrayList<Checksum>();
+ List<Checksum> checksums = new ArrayList<>();
checksums.add( checksumSha1 );
checksums.add( checksumMd5 );