From d9de8dc7afe4a1e22257a9437d68649eee8f3047 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Thu, 10 Apr 2014 11:43:11 +1000 Subject: use diamond operator --- .../apache/archiva/transaction/AbstractTransactionEvent.java | 10 +++++----- .../java/org/apache/archiva/transaction/FileTransaction.java | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'archiva-modules/archiva-base/archiva-transaction') diff --git a/archiva-modules/archiva-base/archiva-transaction/src/main/java/org/apache/archiva/transaction/AbstractTransactionEvent.java b/archiva-modules/archiva-base/archiva-transaction/src/main/java/org/apache/archiva/transaction/AbstractTransactionEvent.java index 7dbe03bf7..73fabc998 100644 --- a/archiva-modules/archiva-base/archiva-transaction/src/main/java/org/apache/archiva/transaction/AbstractTransactionEvent.java +++ b/archiva-modules/archiva-base/archiva-transaction/src/main/java/org/apache/archiva/transaction/AbstractTransactionEvent.java @@ -40,11 +40,11 @@ import java.util.Map; public abstract class AbstractTransactionEvent implements TransactionEvent { - private Map backups = new HashMap(); + private Map backups = new HashMap<>(); - private List createdDirs = new ArrayList(); + private List createdDirs = new ArrayList<>(); - private List createdFiles = new ArrayList(); + private List createdFiles = new ArrayList<>(); /** * {@link List}<{@link Digester}> @@ -75,7 +75,7 @@ public abstract class AbstractTransactionEvent protected void mkDirs( File dir ) throws IOException { - List createDirs = new ArrayList(); + List createDirs = new ArrayList<>(); File parent = dir; while ( !parent.exists() || !parent.isDirectory() ) @@ -87,7 +87,7 @@ public abstract class AbstractTransactionEvent while ( !createDirs.isEmpty() ) { - File directory = (File) createDirs.remove( createDirs.size() - 1 ); + File directory = createDirs.remove( createDirs.size() - 1 ); if ( directory.mkdir() ) { diff --git a/archiva-modules/archiva-base/archiva-transaction/src/main/java/org/apache/archiva/transaction/FileTransaction.java b/archiva-modules/archiva-base/archiva-transaction/src/main/java/org/apache/archiva/transaction/FileTransaction.java index 35d8b005c..80fab4b32 100644 --- a/archiva-modules/archiva-base/archiva-transaction/src/main/java/org/apache/archiva/transaction/FileTransaction.java +++ b/archiva-modules/archiva-base/archiva-transaction/src/main/java/org/apache/archiva/transaction/FileTransaction.java @@ -32,7 +32,7 @@ import org.codehaus.plexus.digest.Digester; */ public class FileTransaction { - private List events = new ArrayList(); + private List events = new ArrayList<>(); public void commit() throws TransactionException -- cgit v1.2.3