diff options
author | Olivier Lamy <olamy@apache.org> | 2014-04-10 11:43:11 +1000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2014-04-10 11:43:11 +1000 |
commit | d9de8dc7afe4a1e22257a9437d68649eee8f3047 (patch) | |
tree | 89e49278beea7304252fd217a35a865986647a44 /archiva-modules/archiva-base/archiva-transaction | |
parent | ff99d5a203756c31bcf4a8a98ec4c25cb423ad74 (diff) | |
download | archiva-d9de8dc7afe4a1e22257a9437d68649eee8f3047.tar.gz archiva-d9de8dc7afe4a1e22257a9437d68649eee8f3047.zip |
use diamond operator
Diffstat (limited to 'archiva-modules/archiva-base/archiva-transaction')
2 files changed, 6 insertions, 6 deletions
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<File, File> backups = new HashMap<File, File>(); + private Map<File, File> backups = new HashMap<>(); - private List<File> createdDirs = new ArrayList<File>(); + private List<File> createdDirs = new ArrayList<>(); - private List<File> createdFiles = new ArrayList<File>(); + private List<File> createdFiles = new ArrayList<>(); /** * {@link List}<{@link Digester}> @@ -75,7 +75,7 @@ public abstract class AbstractTransactionEvent protected void mkDirs( File dir ) throws IOException { - List<File> createDirs = new ArrayList<File>(); + List<File> 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<AbstractTransactionEvent> events = new ArrayList<AbstractTransactionEvent>(); + private List<AbstractTransactionEvent> events = new ArrayList<>(); public void commit() throws TransactionException |