cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject [3/4] cayenne git commit: java 7 style, diamond operator
Date Sun, 18 Dec 2016 19:07:31 GMT
http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/access/ObjectStoreGraphDiff.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/ObjectStoreGraphDiff.java b/cayenne-server/src/main/java/org/apache/cayenne/access/ObjectStoreGraphDiff.java
index 9a0ffba..534a9cc 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/ObjectStoreGraphDiff.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/ObjectStoreGraphDiff.java
@@ -19,13 +19,6 @@
 
 package org.apache.cayenne.access;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
 import org.apache.cayenne.ObjectId;
 import org.apache.cayenne.PersistenceState;
 import org.apache.cayenne.Persistent;
@@ -37,6 +30,13 @@ import org.apache.cayenne.graph.NodeDiff;
 import org.apache.cayenne.validation.ValidationException;
 import org.apache.cayenne.validation.ValidationResult;
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
 /**
  * A GraphDiff facade for the ObjectStore changes. Provides a way for the lower
  * layers of the access stack to speed up processing of presorted ObjectStore
@@ -83,7 +83,7 @@ class ObjectStoreGraphDiff implements GraphDiff {
 
                 if (diff.getObject() instanceof Validating) {
                     if (objectsToValidate == null) {
-                        objectsToValidate = new ArrayList<Validating>();
+                        objectsToValidate = new ArrayList<>();
                     }
 
                     objectsToValidate.add((Validating) diff.getObject());
@@ -158,7 +158,7 @@ class ObjectStoreGraphDiff implements GraphDiff {
 			Map<Object, ObjectDiff> changes = getChangesByObjectId();
 
 			if (!changes.isEmpty()) {
-				List<NodeDiff> allChanges = new ArrayList<NodeDiff>(changes.size() * 2);
+				List<NodeDiff> allChanges = new ArrayList<>(changes.size() * 2);
 
 				for (final ObjectDiff objectDiff : changes.values()) {
 					objectDiff.appendDiffs(allChanges);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/access/PrefetchProcessorJointNode.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/PrefetchProcessorJointNode.java b/cayenne-server/src/main/java/org/apache/cayenne/access/PrefetchProcessorJointNode.java
index 7022dc6..e45cc9f 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/PrefetchProcessorJointNode.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/PrefetchProcessorJointNode.java
@@ -79,8 +79,8 @@ class PrefetchProcessorJointNode extends PrefetchProcessorNode {
         }
 
         objects = new ArrayList(capacity);
-        resolved = new HashMap<Map, Persistent>(capacity);
-        resolvedRows = new ArrayList<DataRow>(capacity);
+        resolved = new HashMap<>(capacity);
+        resolvedRows = new ArrayList<>(capacity);
         buildRowMapping();
         buildPKIndex();
     }
@@ -103,7 +103,7 @@ class PrefetchProcessorJointNode extends PrefetchProcessorNode {
         // likely be an indicator of an outer join ... and considering SQLTemplate,
         // this is reasonable to expect...
 
-        Map<String, Object> id = new TreeMap<String, Object>();
+        Map<String, Object> id = new TreeMap<>();
         for (int idIndex : idIndices) {
             Object value = flatRow.get(columns[idIndex].getDataRowKey());
             id.put(columns[idIndex].getName(), value);
@@ -152,7 +152,7 @@ class PrefetchProcessorJointNode extends PrefetchProcessorNode {
      * Configures row columns mapping for this node entity.
      */
     private void buildRowMapping() {
-        final Map<String, ColumnDescriptor> targetSource = new TreeMap<String, ColumnDescriptor>();
+        final Map<String, ColumnDescriptor> targetSource = new TreeMap<>();
 
         // build a DB path .. find parent node that terminates the joint group...
         PrefetchTreeNode jointRoot = this;

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/access/ResultScanParentAttachmentStrategy.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/ResultScanParentAttachmentStrategy.java b/cayenne-server/src/main/java/org/apache/cayenne/access/ResultScanParentAttachmentStrategy.java
index da125c1..cbbe4e1 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/ResultScanParentAttachmentStrategy.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/ResultScanParentAttachmentStrategy.java
@@ -18,17 +18,17 @@
  ****************************************************************/
 package org.apache.cayenne.access;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.cayenne.DataRow;
 import org.apache.cayenne.Persistent;
 import org.apache.cayenne.map.DbJoin;
 import org.apache.cayenne.map.DbRelationship;
 import org.apache.cayenne.map.ObjRelationship;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 /**
  * Locates parents by checking for the child PK in the parent DataRow under FK.
  */
@@ -76,7 +76,7 @@ class ResultScanParentAttachmentStrategy implements ParentAttachmentStrategy {
 
         if (joins.length > 1) {
 
-            List<Object> values = new ArrayList<Object>(joins.length);
+            List<Object> values = new ArrayList<>(joins.length);
 
             for (int j = 0; j < joins.length; j++) {
                 values.add(row.get(joins[j].getTargetName()));
@@ -120,7 +120,7 @@ class ResultScanParentAttachmentStrategy implements ParentAttachmentStrategy {
 
             if (joins.length > 1) {
 
-                List<Object> values = new ArrayList<Object>(joins.length);
+                List<Object> values = new ArrayList<>(joins.length);
 
                 for (int j = 0; j < joins.length; j++) {
                     values.add(row.get(joins[j].getSourceName()));
@@ -134,7 +134,7 @@ class ResultScanParentAttachmentStrategy implements ParentAttachmentStrategy {
 
             List<Persistent> parents = partitionByChild.get(key);
             if (parents == null) {
-                parents = new ArrayList<Persistent>();
+                parents = new ArrayList<>();
                 partitionByChild.put(key, parents);
             }
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/access/TransactionResultIteratorDecorator.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/TransactionResultIteratorDecorator.java b/cayenne-server/src/main/java/org/apache/cayenne/access/TransactionResultIteratorDecorator.java
index 2b62b1d..d7f7f24 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/TransactionResultIteratorDecorator.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/TransactionResultIteratorDecorator.java
@@ -81,7 +81,7 @@ final class TransactionResultIteratorDecorator<T> implements ResultIterator<T> {
      */
     @Override
     public List<T> allRows() {
-        List<T> list = new ArrayList<T>();
+        List<T> list = new ArrayList<>();
 
         while (hasNextRow()) {
             list.add(nextRow());

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/access/dbsync/SchemaAnalyzer.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/dbsync/SchemaAnalyzer.java b/cayenne-server/src/main/java/org/apache/cayenne/access/dbsync/SchemaAnalyzer.java
index 4cd6b56..dbe1caa 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/dbsync/SchemaAnalyzer.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/dbsync/SchemaAnalyzer.java
@@ -18,6 +18,9 @@
  ****************************************************************/
 package org.apache.cayenne.access.dbsync;
 
+import org.apache.cayenne.map.DbAttribute;
+import org.apache.cayenne.map.DbEntity;
+
 import java.sql.DatabaseMetaData;
 import java.sql.ResultSet;
 import java.sql.SQLException;
@@ -28,9 +31,6 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.cayenne.map.DbAttribute;
-import org.apache.cayenne.map.DbEntity;
-
 /**
  * @since 3.0
  */
@@ -165,7 +165,7 @@ class SchemaAnalyzer {
 		}
 		for (String schema : schemas) {
 
-			Collection<String> tableInSchema = new ArrayList<String>();
+			Collection<String> tableInSchema = new ArrayList<>();
 			try (ResultSet tables = md.getTables(null, schema, null, null);) {
 				while (tables.next()) {
 					String name = tables.getString("TABLE_NAME");
@@ -190,7 +190,7 @@ class SchemaAnalyzer {
 						}
 
 					} else {
-						Collection<String> sc = new ArrayList<String>();
+						Collection<String> sc = new ArrayList<>();
 						sc.add(schema);
 						nameSchemaMap.put(name, sc);
 					}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/DistinctResultIterator.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/DistinctResultIterator.java b/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/DistinctResultIterator.java
index 8f83ccc..4cc0bb6 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/DistinctResultIterator.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/DistinctResultIterator.java
@@ -18,6 +18,12 @@
  ****************************************************************/
 package org.apache.cayenne.access.jdbc;
 
+import org.apache.cayenne.DataRow;
+import org.apache.cayenne.ResultIterator;
+import org.apache.cayenne.map.DbAttribute;
+import org.apache.cayenne.map.DbEntity;
+import org.apache.cayenne.util.ResultIteratorIterator;
+
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -27,12 +33,6 @@ import java.util.Map;
 import java.util.NoSuchElementException;
 import java.util.Set;
 
-import org.apache.cayenne.DataRow;
-import org.apache.cayenne.ResultIterator;
-import org.apache.cayenne.map.DbAttribute;
-import org.apache.cayenne.map.DbEntity;
-import org.apache.cayenne.util.ResultIteratorIterator;
-
 /**
  * A ResultIterator that does in-memory filtering of rows to return only
  * distinct rows. Distinct comparison is done by comparing ObjectIds created
@@ -94,7 +94,7 @@ public class DistinctResultIterator<T> implements ResultIterator<T> {
      */
     @Override
     public List<T> allRows() {
-        List<T> list = new ArrayList<T>();
+        List<T> list = new ArrayList<>();
 
         while (this.hasNextRow()) {
             list.add(nextRow());

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/JDBCResultIterator.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/JDBCResultIterator.java b/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/JDBCResultIterator.java
index a5c494f..ffa1ad3 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/JDBCResultIterator.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/JDBCResultIterator.java
@@ -19,6 +19,11 @@
 
 package org.apache.cayenne.access.jdbc;
 
+import org.apache.cayenne.CayenneRuntimeException;
+import org.apache.cayenne.ResultIterator;
+import org.apache.cayenne.access.jdbc.reader.RowReader;
+import org.apache.cayenne.util.ResultIteratorIterator;
+
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Statement;
@@ -27,11 +32,6 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.NoSuchElementException;
 
-import org.apache.cayenne.CayenneRuntimeException;
-import org.apache.cayenne.ResultIterator;
-import org.apache.cayenne.access.jdbc.reader.RowReader;
-import org.apache.cayenne.util.ResultIteratorIterator;
-
 /**
  * A ResultIterator over the underlying JDBC ResultSet.
  * 
@@ -74,7 +74,7 @@ public class JDBCResultIterator<T> implements ResultIterator<T> {
      */
     @Override
     public List<T> allRows() {
-        List<T> list = new ArrayList<T>();
+        List<T> list = new ArrayList<>();
 
         while (hasNextRow()) {
             list.add(nextRow());

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/LimitResultIterator.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/LimitResultIterator.java b/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/LimitResultIterator.java
index e0d5503..e2f03ce 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/LimitResultIterator.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/LimitResultIterator.java
@@ -18,15 +18,15 @@
  ****************************************************************/
 package org.apache.cayenne.access.jdbc;
 
+import org.apache.cayenne.ResultIterator;
+import org.apache.cayenne.util.ResultIteratorIterator;
+
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.NoSuchElementException;
 
-import org.apache.cayenne.ResultIterator;
-import org.apache.cayenne.util.ResultIteratorIterator;
-
 /**
  * @since 3.0
  */
@@ -89,7 +89,7 @@ public class LimitResultIterator<T> implements ResultIterator<T> {
     @Override
     public List<T> allRows() {
 
-        List<T> list = new ArrayList<T>();
+        List<T> list = new ArrayList<>();
 
         while (hasNextRow()) {
             list.add(nextRow());

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/SQLTemplateAction.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/SQLTemplateAction.java b/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/SQLTemplateAction.java
index 876c77e..eea8470 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/SQLTemplateAction.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/SQLTemplateAction.java
@@ -19,19 +19,6 @@
 
 package org.apache.cayenne.access.jdbc;
 
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.cayenne.CayenneException;
 import org.apache.cayenne.DataRow;
 import org.apache.cayenne.ResultIterator;
@@ -53,6 +40,19 @@ import org.apache.cayenne.query.SQLTemplate;
 import org.apache.cayenne.util.Util;
 import org.apache.commons.collections.IteratorUtils;
 
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
 /**
  * Implements a strategy for execution of SQLTemplates.
  * 
@@ -103,7 +103,7 @@ public class SQLTemplateAction implements SQLAction {
 		}
 
 		boolean loggable = dataNode.getJdbcEventLogger().isLoggable();
-		List<Number> counts = new ArrayList<Number>();
+		List<Number> counts = new ArrayList<>();
 
 		// bind either positional or named parameters;
 		// for legacy reasons named parameters are processed as a batch.. this

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/reader/DefaultRowReaderFactory.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/reader/DefaultRowReaderFactory.java b/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/reader/DefaultRowReaderFactory.java
index 3391094..8776516 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/reader/DefaultRowReaderFactory.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/reader/DefaultRowReaderFactory.java
@@ -18,13 +18,6 @@
  ****************************************************************/
 package org.apache.cayenne.access.jdbc.reader;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
 import org.apache.cayenne.CayenneRuntimeException;
 import org.apache.cayenne.access.jdbc.ColumnDescriptor;
 import org.apache.cayenne.access.jdbc.RowDescriptor;
@@ -40,6 +33,13 @@ import org.apache.cayenne.query.QueryMetadata;
 import org.apache.cayenne.query.ScalarResultSegment;
 import org.apache.cayenne.reflect.ClassDescriptor;
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
 /**
  * @since 4.0
  */
@@ -185,7 +185,7 @@ public class DefaultRowReaderFactory implements RowReaderFactory {
 				Collection<ColumnOverride> overrides = columnOverrides.get(entity.getName());
 
 				if (overrides == null) {
-					overrides = new ArrayList<ColumnOverride>(3);
+					overrides = new ArrayList<>(3);
 					columnOverrides.put(entity.getName(), overrides);
 				}
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/access/translator/ejbql/EJBQLConditionTranslator.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/translator/ejbql/EJBQLConditionTranslator.java b/cayenne-server/src/main/java/org/apache/cayenne/access/translator/ejbql/EJBQLConditionTranslator.java
index 8f6b0be..11fa179 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/translator/ejbql/EJBQLConditionTranslator.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/translator/ejbql/EJBQLConditionTranslator.java
@@ -18,13 +18,6 @@
  ****************************************************************/
 package org.apache.cayenne.access.translator.ejbql;
 
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.cayenne.ObjectId;
 import org.apache.cayenne.Persistent;
 import org.apache.cayenne.dba.QuotingStrategy;
@@ -54,6 +47,13 @@ import org.apache.cayenne.reflect.AttributeProperty;
 import org.apache.cayenne.reflect.ClassDescriptor;
 import org.apache.cayenne.reflect.PropertyDescriptor;
 
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
 /**
  * @since 3.0
  */
@@ -68,7 +68,7 @@ public class EJBQLConditionTranslator extends EJBQLBaseVisitor {
 
     protected void addMultiColumnOperand(EJBQLMultiColumnOperand operand) {
         if (multiColumnOperands == null) {
-            multiColumnOperands = new ArrayList<EJBQLMultiColumnOperand>(2);
+            multiColumnOperands = new ArrayList<>(2);
         }
 
         multiColumnOperands.add(operand);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/access/translator/ejbql/EJBQLTranslationContext.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/translator/ejbql/EJBQLTranslationContext.java b/cayenne-server/src/main/java/org/apache/cayenne/access/translator/ejbql/EJBQLTranslationContext.java
index 78adf11..2f5e58d 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/translator/ejbql/EJBQLTranslationContext.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/translator/ejbql/EJBQLTranslationContext.java
@@ -18,14 +18,6 @@
  ****************************************************************/
 package org.apache.cayenne.access.translator.ejbql;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.cayenne.dba.QuotingStrategy;
 import org.apache.cayenne.ejbql.EJBQLCompiledExpression;
 import org.apache.cayenne.ejbql.EJBQLException;
@@ -39,6 +31,14 @@ import org.apache.cayenne.query.SQLTemplate;
 import org.apache.cayenne.query.ScalarResultSegment;
 import org.apache.cayenne.reflect.ClassDescriptor;
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
 /**
  * A context used for translating of EJBQL to SQL.
  * 
@@ -89,11 +89,11 @@ public class EJBQLTranslationContext {
 
         // buffer stack will hold named buffers during translation in the order they were
         // requested
-        this.bufferStack = new ArrayList<StringBuilder>();
+        this.bufferStack = new ArrayList<>();
 
         // buffer chain will hold named and unnamed buffers in the order they should be
         // concatenated
-        this.bufferChain = new ArrayList<StringBuilder>();
+        this.bufferChain = new ArrayList<>();
 
         stackTop = new StringBuilder();
         bufferChain.add(stackTop);
@@ -167,10 +167,10 @@ public class EJBQLTranslationContext {
             }
             else {
                 DbRelationship last = incoming.get(incoming.size() - 1);
-                entity = (DbEntity) last.getTargetEntity();
+                entity = last.getTargetEntity();
             }
 
-            incoming = new ArrayList<DbRelationship>(incoming);
+            incoming = new ArrayList<>(incoming);
 
             Iterator<?> it = entity.resolvePathComponents(id.getDbPath());
             while (it.hasNext()) {
@@ -351,7 +351,7 @@ public class EJBQLTranslationContext {
     List<String> bindParameters(Object value) {
         if(Collection.class.isAssignableFrom(value.getClass())) {
             Iterator<?> parameterValueIterator = ((Collection<?>) value).iterator();
-            List<String> result = new ArrayList<String>();
+            List<String> result = new ArrayList<>();
 
             while(parameterValueIterator.hasNext()) {
                 result.add(bindParameter(parameterValueIterator.next()));

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/access/translator/procedure/ProcedureTranslator.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/translator/procedure/ProcedureTranslator.java b/cayenne-server/src/main/java/org/apache/cayenne/access/translator/procedure/ProcedureTranslator.java
index c5c04f9..f919a8b 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/translator/procedure/ProcedureTranslator.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/translator/procedure/ProcedureTranslator.java
@@ -147,7 +147,7 @@ public class ProcedureTranslator {
 		long t1 = System.currentTimeMillis();
 
 		this.callParams = getProcedure().getCallParameters();
-		this.values = new ArrayList<Object>(callParams.size());
+		this.values = new ArrayList<>(callParams.size());
 
 		initValues();
 		String sqlStr = createSqlString();
@@ -156,7 +156,7 @@ public class ProcedureTranslator {
 			// need to convert OUT/VOID parameters to loggable strings
 			long time = System.currentTimeMillis() - t1;
 
-			List<Object> loggableParameters = new ArrayList<Object>(values.size());
+			List<Object> loggableParameters = new ArrayList<>(values.size());
 			for (Object val : values) {
 				if (val instanceof NotInParam) {
 					val = val.toString();

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/DefaultSelectTranslator.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/DefaultSelectTranslator.java b/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/DefaultSelectTranslator.java
index 5e67b21..22f1ed6 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/DefaultSelectTranslator.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/DefaultSelectTranslator.java
@@ -18,16 +18,6 @@
  ****************************************************************/
 package org.apache.cayenne.access.translator.select;
 
-import java.sql.Types;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
 import org.apache.cayenne.CayenneRuntimeException;
 import org.apache.cayenne.access.jdbc.ColumnDescriptor;
 import org.apache.cayenne.dba.DbAdapter;
@@ -60,6 +50,16 @@ import org.apache.cayenne.util.CayenneMapEntry;
 import org.apache.cayenne.util.EqualsBuilder;
 import org.apache.cayenne.util.HashCodeBuilder;
 
+import java.sql.Types;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
 /**
  * @since 4.0
  */
@@ -149,7 +149,7 @@ public class DefaultSelectTranslator extends QueryAssembler implements SelectTra
 		}
 
 		// convert ColumnDescriptors to column names
-		List<String> selectColumnExpList = new ArrayList<String>();
+		List<String> selectColumnExpList = new ArrayList<>();
 		for (ColumnDescriptor column : resultColumns) {
 			String fullName = strategy.quotedIdentifier(dataMap, column.getNamePrefix(), column.getName());
 			selectColumnExpList.add(fullName);
@@ -285,9 +285,9 @@ public class DefaultSelectTranslator extends QueryAssembler implements SelectTra
 
 	protected List<ColumnDescriptor> buildResultColumns() {
 
-		this.defaultAttributesByColumn = new HashMap<ColumnDescriptor, ObjAttribute>();
+		this.defaultAttributesByColumn = new HashMap<>();
 
-		List<ColumnDescriptor> columns = new ArrayList<ColumnDescriptor>();
+		List<ColumnDescriptor> columns = new ArrayList<>();
 		SelectQuery<?> query = getSelectQuery();
 
 		if (query.getRoot() instanceof DbEntity) {
@@ -303,7 +303,7 @@ public class DefaultSelectTranslator extends QueryAssembler implements SelectTra
 
 	<T> List<ColumnDescriptor> appendDbEntityColumns(List<ColumnDescriptor> columns, SelectQuery<T> query) {
 
-		Set<ColumnTracker> attributes = new HashSet<ColumnTracker>();
+		Set<ColumnTracker> attributes = new HashSet<>();
 
 		DbEntity table = getQueryMetadata().getDbEntity();
 		for (DbAttribute dba : table.getAttributes()) {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/JoinTreeNode.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/JoinTreeNode.java b/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/JoinTreeNode.java
index edf09cc..fc80fa3 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/JoinTreeNode.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/JoinTreeNode.java
@@ -18,14 +18,14 @@
  ****************************************************************/
 package org.apache.cayenne.access.translator.select;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-
 import org.apache.cayenne.map.DbRelationship;
 import org.apache.cayenne.map.JoinType;
 import org.apache.cayenne.util.Util;
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+
 /**
  * @since 3.0
  */
@@ -79,7 +79,7 @@ public final class JoinTreeNode {
             String alias) {
 
         if (children == null) {
-            children = new ArrayList<JoinTreeNode>(4);
+            children = new ArrayList<>(4);
         }
         else {
             for (JoinTreeNode child : children) {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/OrderingTranslator.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/OrderingTranslator.java b/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/OrderingTranslator.java
index 4a16678..7a7ba4f 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/OrderingTranslator.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/OrderingTranslator.java
@@ -19,22 +19,22 @@
 
 package org.apache.cayenne.access.translator.select;
 
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
 import org.apache.cayenne.CayenneRuntimeException;
 import org.apache.cayenne.exp.Expression;
 import org.apache.cayenne.query.Ordering;
 import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.SelectQuery;
 
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
 /**
  * Translates query ordering to SQL.
  */
 public class OrderingTranslator extends QueryAssemblerHelper {
 
-	protected List<String> orderByColumnList = new ArrayList<String>();
+	protected List<String> orderByColumnList = new ArrayList<>();
 
 	public OrderingTranslator(QueryAssembler queryAssembler) {
 		super(queryAssembler);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/QueryAssembler.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/QueryAssembler.java b/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/QueryAssembler.java
index 03949c6..f026823 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/QueryAssembler.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/translator/select/QueryAssembler.java
@@ -55,7 +55,7 @@ public abstract class QueryAssembler {
 		this.adapter = adapter;
 		this.query = query;
 		this.queryMetadata = query.getMetaData(entityResolver);
-		this.bindings = new ArrayList<DbAttributeBinding>();
+		this.bindings = new ArrayList<>();
 	}
 
 	/**

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/access/util/DefaultOperationObserver.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/access/util/DefaultOperationObserver.java b/cayenne-server/src/main/java/org/apache/cayenne/access/util/DefaultOperationObserver.java
index 217cf8e..e44df45 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/access/util/DefaultOperationObserver.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/access/util/DefaultOperationObserver.java
@@ -19,17 +19,17 @@
 
 package org.apache.cayenne.access.util;
 
+import org.apache.cayenne.ResultIterator;
+import org.apache.cayenne.access.OperationObserver;
+import org.apache.cayenne.query.Query;
+import org.apache.cayenne.util.Util;
+
 import java.io.PrintWriter;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.cayenne.ResultIterator;
-import org.apache.cayenne.access.OperationObserver;
-import org.apache.cayenne.query.Query;
-import org.apache.cayenne.util.Util;
-
 /**
  * Simple implementation of OperationObserver interface. Useful as a superclass
  * of other implementations of OperationObserver. This implementation only
@@ -42,8 +42,8 @@ import org.apache.cayenne.util.Util;
  */
 public class DefaultOperationObserver implements OperationObserver {
 
-    protected List<Throwable> globalExceptions = new ArrayList<Throwable>();
-    protected Map<Query, Throwable> queryExceptions = new HashMap<Query, Throwable>();
+    protected List<Throwable> globalExceptions = new ArrayList<>();
+    protected Map<Query, Throwable> queryExceptions = new HashMap<>();
 
     /**
      * Prints the information about query and global exceptions.

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/ashwood/AshwoodEntitySorter.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/ashwood/AshwoodEntitySorter.java b/cayenne-server/src/main/java/org/apache/cayenne/ashwood/AshwoodEntitySorter.java
index 1f3a16c..192e342 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/ashwood/AshwoodEntitySorter.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/ashwood/AshwoodEntitySorter.java
@@ -218,7 +218,7 @@ public class AshwoodEntitySorter implements EntitySorter {
 			reflexiveRelNames[i] = (objRel != null ? objRel.getName() : null);
 		}
 
-		List<Persistent> sorted = new ArrayList<Persistent>(size);
+		List<Persistent> sorted = new ArrayList<>(size);
 
 		Digraph<Persistent, Boolean> objectDependencyGraph = new MapDigraph<>();
 		Object[] masters = new Object[reflexiveRelNames.length];

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/ashwood/graph/StrongConnection.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/ashwood/graph/StrongConnection.java b/cayenne-server/src/main/java/org/apache/cayenne/ashwood/graph/StrongConnection.java
index 62dbddd..756b1b3 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/ashwood/graph/StrongConnection.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/ashwood/graph/StrongConnection.java
@@ -59,6 +59,11 @@
  */
 package org.apache.cayenne.ashwood.graph;
 
+import org.apache.commons.collections.ArrayStack;
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.collections.Predicate;
+import org.apache.commons.collections.functors.TruePredicate;
+
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -68,11 +73,6 @@ import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.commons.collections.ArrayStack;
-import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.collections.Predicate;
-import org.apache.commons.collections.functors.TruePredicate;
-
 /**
  * @since 3.1
  */
@@ -153,7 +153,7 @@ public class StrongConnection<E, V> implements Iterator<Collection<E>> {
 					} else {
 						if (contractedArc.size() == 1) {
 							Collection<V> tmp = contractedArc;
-							contractedArc = new ArrayList<V>();
+							contractedArc = new ArrayList<>();
 							contractedArc.addAll(tmp);
 							contractedDigraph.putArc(origin, destination, contractedArc);
 						}
@@ -201,7 +201,7 @@ public class StrongConnection<E, V> implements Iterator<Collection<E>> {
 		Collection<E> component = Collections.singletonList(root);
 		boolean singleton = true;
 		if (reverseDfs == null)
-			reverseDfs = new DepthFirstSearch<E>(reverseDigraph, root);
+			reverseDfs = new DepthFirstSearch<>(reverseDigraph, root);
 		else
 			reverseDfs.reset(root);
 		while (reverseDfs.hasNext()) {
@@ -209,7 +209,7 @@ public class StrongConnection<E, V> implements Iterator<Collection<E>> {
 			if (vertex != root) {
 				if (singleton) {
 					Collection<E> tmp = component;
-					component = new ArrayList<E>();
+					component = new ArrayList<>();
 					component.addAll(tmp);
 					singleton = false;
 				}
@@ -223,7 +223,7 @@ public class StrongConnection<E, V> implements Iterator<Collection<E>> {
 
 	private class DFSSeenVerticesPredicate implements Predicate {
 
-		private Set<E> seenVertices = new HashSet<E>();
+		private Set<E> seenVertices = new HashSet<>();
 
 		@Override
 		public boolean evaluate(Object vertex) {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/configuration/DataNodeDescriptor.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/configuration/DataNodeDescriptor.java b/cayenne-server/src/main/java/org/apache/cayenne/configuration/DataNodeDescriptor.java
index e3c4aef..7192d0d 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/configuration/DataNodeDescriptor.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/configuration/DataNodeDescriptor.java
@@ -63,7 +63,7 @@ public class DataNodeDescriptor implements ConfigurationNode, XMLSerializable,
     }
 
     public DataNodeDescriptor(String name) {
-        this.dataMapNames = new ArrayList<String>();
+        this.dataMapNames = new ArrayList<>();
         this.name = name;
     }
 
@@ -116,7 +116,7 @@ public class DataNodeDescriptor implements ConfigurationNode, XMLSerializable,
 
         if (!dataMapNames.isEmpty()) {
 
-            List<String> names = new ArrayList<String>(dataMapNames);
+            List<String> names = new ArrayList<>(dataMapNames);
             Collections.sort(names);
 
             for (String mapName : names) {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilder.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilder.java b/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilder.java
index 19938b5..8c60206 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilder.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilder.java
@@ -92,8 +92,8 @@ public class ServerRuntimeBuilder {
     @Deprecated
     // TODO make private once we are comfortable with removal of the deprecated API
     public ServerRuntimeBuilder(String name) {
-        this.configs = new LinkedHashSet<String>();
-        this.modules = new ArrayList<Module>();
+        this.configs = new LinkedHashSet<>();
+        this.modules = new ArrayList<>();
         this.name = name;
         this.autoLoadModules = true;
     }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/configuration/web/CayenneFilter.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/configuration/web/CayenneFilter.java b/cayenne-server/src/main/java/org/apache/cayenne/configuration/web/CayenneFilter.java
index 12226a1..f43fc00 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/configuration/web/CayenneFilter.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/configuration/web/CayenneFilter.java
@@ -18,9 +18,10 @@
  ****************************************************************/
 package org.apache.cayenne.configuration.web;
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
+import org.apache.cayenne.configuration.CayenneRuntime;
+import org.apache.cayenne.configuration.server.ServerModule;
+import org.apache.cayenne.configuration.server.ServerRuntime;
+import org.apache.cayenne.di.Module;
 
 import javax.servlet.Filter;
 import javax.servlet.FilterChain;
@@ -29,11 +30,9 @@ import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
-
-import org.apache.cayenne.configuration.CayenneRuntime;
-import org.apache.cayenne.configuration.server.ServerModule;
-import org.apache.cayenne.configuration.server.ServerRuntime;
-import org.apache.cayenne.di.Module;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
 
 /**
  * A filter that creates a Cayenne server runtime, possibly including custom modules. By
@@ -86,7 +85,7 @@ public class CayenneFilter implements Filter {
      * @since 4.0
      */
     protected Collection<Module> getAdditionalModules() {
-		return new ArrayList<Module>();
+		return new ArrayList<>();
 	}
 
     protected void checkAlreadyConfigured(ServletContext context) throws ServletException {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/configuration/web/WebConfiguration.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/configuration/web/WebConfiguration.java b/cayenne-server/src/main/java/org/apache/cayenne/configuration/web/WebConfiguration.java
index 40bffdc..f349ac7 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/configuration/web/WebConfiguration.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/configuration/web/WebConfiguration.java
@@ -18,6 +18,13 @@
  ****************************************************************/
 package org.apache.cayenne.configuration.web;
 
+import org.apache.cayenne.di.Module;
+import org.apache.cayenne.util.Util;
+
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -28,14 +35,6 @@ import java.util.Map;
 import java.util.Set;
 import java.util.StringTokenizer;
 
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-
-import org.apache.cayenne.di.Module;
-import org.apache.cayenne.util.Util;
-
 /**
  * A class that provides access to common Cayenne web configuration parameters retrieved
  * either from a FilterConfig or a ServletConfig configuration.
@@ -111,8 +110,8 @@ public class WebConfiguration {
     public Collection<Module> createModules(Module... standardModules)
             throws ServletException {
 
-        Set<String> existingModules = new HashSet<String>();
-        Collection<Module> modules = new ArrayList<Module>();
+        Set<String> existingModules = new HashSet<>();
+        Collection<Module> modules = new ArrayList<>();
 
         if (standardModules != null) {
             for (Module module : standardModules) {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/dba/JdbcPkGenerator.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/JdbcPkGenerator.java b/cayenne-server/src/main/java/org/apache/cayenne/dba/JdbcPkGenerator.java
index 9e159d2..0187bf8 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/JdbcPkGenerator.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/JdbcPkGenerator.java
@@ -88,7 +88,7 @@ public class JdbcPkGenerator implements PkGenerator {
 	}
 
 	public List<String> createAutoPkStatements(List<DbEntity> dbEntities) {
-		List<String> list = new ArrayList<String>(dbEntities.size() + 2);
+		List<String> list = new ArrayList<>(dbEntities.size() + 2);
 
 		list.add(pkTableCreateString());
 		list.add(pkDeleteString(dbEntities));
@@ -110,7 +110,7 @@ public class JdbcPkGenerator implements PkGenerator {
 	}
 
 	public List<String> dropAutoPkStatements(List<DbEntity> dbEntities) {
-		List<String> list = new ArrayList<String>(1);
+		List<String> list = new ArrayList<>(1);
 		list.add(dropAutoPkString());
 		return list;
 	}
@@ -272,7 +272,7 @@ public class JdbcPkGenerator implements PkGenerator {
 				+ "WHERE TABLE_NAME = '" + entity.getName() + '\'';
 
 		// run queries via DataNode to utilize its transactional behavior
-		List<Query> queries = new ArrayList<Query>(2);
+		List<Query> queries = new ArrayList<>(2);
 		queries.add(new SQLTemplate(entity, select));
 		queries.add(new SQLTemplate(entity, pkUpdateString(entity.getName())));
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/dba/TypesHandler.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/TypesHandler.java b/cayenne-server/src/main/java/org/apache/cayenne/dba/TypesHandler.java
index 100ca5c..0f07b25 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/TypesHandler.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/TypesHandler.java
@@ -19,15 +19,6 @@
 
 package org.apache.cayenne.dba;
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.sql.Types;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.cayenne.CayenneRuntimeException;
 import org.apache.cayenne.util.Util;
 import org.xml.sax.Attributes;
@@ -36,6 +27,14 @@ import org.xml.sax.SAXException;
 import org.xml.sax.XMLReader;
 import org.xml.sax.helpers.DefaultHandler;
 
+import java.io.InputStream;
+import java.net.URL;
+import java.sql.Types;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 /**
  * TypesHandler provides JDBC-RDBMS types mapping. Loads types info from an XML
  * file.
@@ -96,8 +95,8 @@ public class TypesHandler {
 		private static final String DB_TYPE_TAG = "db-type";
 		private static final String NAME_ATTR = "name";
 
-		private Map<Integer, String[]> types = new HashMap<Integer, String[]>();
-		private List<String> currentTypes = new ArrayList<String>();
+		private Map<Integer, String[]> types = new HashMap<>();
+		private List<String> currentTypes = new ArrayList<>();
 		private int currentType = TypesMapping.NOT_DEFINED;
 
 		public Map<Integer, String[]> getTypes() {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/dba/TypesMapping.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/TypesMapping.java b/cayenne-server/src/main/java/org/apache/cayenne/dba/TypesMapping.java
index 1eed22a..b42eb9b 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/TypesMapping.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/TypesMapping.java
@@ -362,7 +362,7 @@ public class TypesMapping {
 			}
 		}
 
-		List<TypeInfo> list = new ArrayList<TypeInfo>();
+		List<TypeInfo> list = new ArrayList<>();
 		for (TypeInfo alt : alts) {
 			if (maxPrec == alt.precision) {
 				list.add(alt);
@@ -527,7 +527,7 @@ public class TypesMapping {
 				List<TypeInfo> infos = databaseTypes.get(key);
 
 				if (infos == null) {
-					infos = new ArrayList<TypeInfo>();
+					infos = new ArrayList<>();
 					databaseTypes.put(key, infos);
 				}
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/dba/db2/DB2PkGenerator.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/db2/DB2PkGenerator.java b/cayenne-server/src/main/java/org/apache/cayenne/dba/db2/DB2PkGenerator.java
index 667d6db..0e0c64c 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/db2/DB2PkGenerator.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/db2/DB2PkGenerator.java
@@ -18,6 +18,13 @@
  ****************************************************************/
 package org.apache.cayenne.dba.db2;
 
+import org.apache.cayenne.CayenneRuntimeException;
+import org.apache.cayenne.access.DataNode;
+import org.apache.cayenne.dba.JdbcAdapter;
+import org.apache.cayenne.dba.JdbcPkGenerator;
+import org.apache.cayenne.map.DataMap;
+import org.apache.cayenne.map.DbEntity;
+
 import java.sql.Connection;
 import java.sql.ResultSet;
 import java.sql.SQLException;
@@ -27,13 +34,6 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 
-import org.apache.cayenne.CayenneRuntimeException;
-import org.apache.cayenne.access.DataNode;
-import org.apache.cayenne.dba.JdbcAdapter;
-import org.apache.cayenne.dba.JdbcPkGenerator;
-import org.apache.cayenne.map.DataMap;
-import org.apache.cayenne.map.DbEntity;
-
 /**
  * A sequence-based PK generator used by {@link DB2Adapter}.
  */
@@ -85,7 +85,7 @@ public class DB2PkGenerator extends JdbcPkGenerator {
 	 */
 	@Override
 	public List<String> createAutoPkStatements(List<DbEntity> dbEntities) {
-		List<String> list = new ArrayList<String>(dbEntities.size());
+		List<String> list = new ArrayList<>(dbEntities.size());
 		for (DbEntity entity : dbEntities) {
 			list.add(createSequenceString(entity));
 		}
@@ -122,7 +122,7 @@ public class DB2PkGenerator extends JdbcPkGenerator {
 	 */
 	@Override
 	public List<String> dropAutoPkStatements(List<DbEntity> dbEntities) {
-		List<String> list = new ArrayList<String>(dbEntities.size());
+		List<String> list = new ArrayList<>(dbEntities.size());
 		for (DbEntity entity : dbEntities) {
 			list.add(dropSequenceString(entity));
 		}
@@ -148,7 +148,7 @@ public class DB2PkGenerator extends JdbcPkGenerator {
 				adapter.getJdbcEventLogger().logQuery(sql, Collections.EMPTY_LIST);
 
 				try (ResultSet rs = sel.executeQuery(sql);) {
-					List<String> sequenceList = new ArrayList<String>();
+					List<String> sequenceList = new ArrayList<>();
 					while (rs.next()) {
 						sequenceList.add(rs.getString(1));
 					}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/dba/frontbase/FrontBasePkGenerator.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/frontbase/FrontBasePkGenerator.java b/cayenne-server/src/main/java/org/apache/cayenne/dba/frontbase/FrontBasePkGenerator.java
index 716cbd8..8162066 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/frontbase/FrontBasePkGenerator.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/frontbase/FrontBasePkGenerator.java
@@ -19,10 +19,6 @@
 
 package org.apache.cayenne.dba.frontbase;
 
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
 import org.apache.cayenne.CayenneRuntimeException;
 import org.apache.cayenne.DataRow;
 import org.apache.cayenne.access.DataNode;
@@ -34,6 +30,10 @@ import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.SQLTemplate;
 
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
 /**
  * @since 1.2
  */
@@ -62,7 +62,7 @@ public class FrontBasePkGenerator extends JdbcPkGenerator {
 
 	@Override
 	public List<String> createAutoPkStatements(List<DbEntity> dbEntities) {
-		List<String> list = new ArrayList<String>();
+		List<String> list = new ArrayList<>();
 		for (DbEntity entity : dbEntities) {
 			list.add(pkCreateString(entity.getName()));
 		}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/dba/h2/H2PkGenerator.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/h2/H2PkGenerator.java b/cayenne-server/src/main/java/org/apache/cayenne/dba/h2/H2PkGenerator.java
index a7d7788..3faf0e3 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/h2/H2PkGenerator.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/h2/H2PkGenerator.java
@@ -19,6 +19,13 @@
 
 package org.apache.cayenne.dba.h2;
 
+import org.apache.cayenne.CayenneRuntimeException;
+import org.apache.cayenne.access.DataNode;
+import org.apache.cayenne.dba.JdbcAdapter;
+import org.apache.cayenne.dba.oracle.OraclePkGenerator;
+import org.apache.cayenne.map.DbEntity;
+import org.apache.cayenne.map.DbKeyGenerator;
+
 import java.sql.Connection;
 import java.sql.ResultSet;
 import java.sql.SQLException;
@@ -27,13 +34,6 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
-import org.apache.cayenne.CayenneRuntimeException;
-import org.apache.cayenne.access.DataNode;
-import org.apache.cayenne.dba.JdbcAdapter;
-import org.apache.cayenne.dba.oracle.OraclePkGenerator;
-import org.apache.cayenne.map.DbEntity;
-import org.apache.cayenne.map.DbKeyGenerator;
-
 /**
  * Default PK generator for H2 that uses sequences for PK generation.
  * 
@@ -96,7 +96,7 @@ public class H2PkGenerator extends OraclePkGenerator {
 				adapter.getJdbcEventLogger().logQuery(sql, Collections.EMPTY_LIST);
 
 				try (ResultSet rs = sel.executeQuery(sql);) {
-					List<String> sequenceList = new ArrayList<String>();
+					List<String> sequenceList = new ArrayList<>();
 					while (rs.next()) {
 						sequenceList.add(rs.getString(1));
 					}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/dba/ingres/IngresPkGenerator.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/ingres/IngresPkGenerator.java b/cayenne-server/src/main/java/org/apache/cayenne/dba/ingres/IngresPkGenerator.java
index 91c8db2..0950e90 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/ingres/IngresPkGenerator.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/ingres/IngresPkGenerator.java
@@ -19,6 +19,13 @@
 
 package org.apache.cayenne.dba.ingres;
 
+import org.apache.cayenne.CayenneRuntimeException;
+import org.apache.cayenne.access.DataNode;
+import org.apache.cayenne.dba.JdbcAdapter;
+import org.apache.cayenne.dba.oracle.OraclePkGenerator;
+import org.apache.cayenne.map.DbEntity;
+import org.apache.cayenne.map.DbKeyGenerator;
+
 import java.sql.Connection;
 import java.sql.ResultSet;
 import java.sql.SQLException;
@@ -27,13 +34,6 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
-import org.apache.cayenne.CayenneRuntimeException;
-import org.apache.cayenne.access.DataNode;
-import org.apache.cayenne.dba.JdbcAdapter;
-import org.apache.cayenne.dba.oracle.OraclePkGenerator;
-import org.apache.cayenne.map.DbEntity;
-import org.apache.cayenne.map.DbKeyGenerator;
-
 /**
  * Ingres-specific sequence based PK generator.
  * 
@@ -86,7 +86,7 @@ public class IngresPkGenerator extends OraclePkGenerator {
 				adapter.getJdbcEventLogger().logQuery(sql, Collections.EMPTY_LIST);
 
 				try (ResultSet rs = select.executeQuery(sql);) {
-					List<String> sequenceList = new ArrayList<String>();
+					List<String> sequenceList = new ArrayList<>();
 					while (rs.next()) {
 						String name = rs.getString(1);
 						if (name != null) {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/dba/mysql/MySQLAdapter.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/mysql/MySQLAdapter.java b/cayenne-server/src/main/java/org/apache/cayenne/dba/mysql/MySQLAdapter.java
index 1ecac8a..f18d808 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/mysql/MySQLAdapter.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/mysql/MySQLAdapter.java
@@ -284,7 +284,7 @@ public class MySQLAdapter extends JdbcAdapter {
 	protected void createTableAppendPKClause(StringBuffer sqlBuffer, DbEntity entity) {
 
 		// must move generated to the front...
-		List<DbAttribute> pkList = new ArrayList<DbAttribute>(entity.getPrimaryKeys());
+		List<DbAttribute> pkList = new ArrayList<>(entity.getPrimaryKeys());
 		Collections.sort(pkList, new PKComparator());
 
 		Iterator<DbAttribute> pkit = pkList.iterator();

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/dba/openbase/OpenBasePkGenerator.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/openbase/OpenBasePkGenerator.java b/cayenne-server/src/main/java/org/apache/cayenne/dba/openbase/OpenBasePkGenerator.java
index bb3068f..6a19de3 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/openbase/OpenBasePkGenerator.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/openbase/OpenBasePkGenerator.java
@@ -19,6 +19,15 @@
 
 package org.apache.cayenne.dba.openbase;
 
+import org.apache.cayenne.CayenneRuntimeException;
+import org.apache.cayenne.access.DataNode;
+import org.apache.cayenne.dba.JdbcAdapter;
+import org.apache.cayenne.dba.JdbcPkGenerator;
+import org.apache.cayenne.dba.QuotingStrategy;
+import org.apache.cayenne.map.DbAttribute;
+import org.apache.cayenne.map.DbEntity;
+import org.apache.cayenne.util.IDUtil;
+
 import java.sql.Connection;
 import java.sql.ResultSet;
 import java.sql.Statement;
@@ -29,15 +38,6 @@ import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.cayenne.CayenneRuntimeException;
-import org.apache.cayenne.access.DataNode;
-import org.apache.cayenne.dba.JdbcAdapter;
-import org.apache.cayenne.dba.JdbcPkGenerator;
-import org.apache.cayenne.dba.QuotingStrategy;
-import org.apache.cayenne.map.DbAttribute;
-import org.apache.cayenne.map.DbEntity;
-import org.apache.cayenne.util.IDUtil;
-
 /**
  * @since 1.1
  */
@@ -152,7 +152,7 @@ public class OpenBasePkGenerator extends JdbcPkGenerator {
      */
 	@Override
 	public List createAutoPkStatements(List dbEntities) {
-		List<String> list = new ArrayList<String>(2 * dbEntities.size());
+		List<String> list = new ArrayList<>(2 * dbEntities.size());
 		Iterator<?> it = dbEntities.iterator();
 		while (it.hasNext()) {
 			DbEntity entity = (DbEntity) it.next();

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/Oracle8LOBBatchQueryWrapper.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/Oracle8LOBBatchQueryWrapper.java b/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/Oracle8LOBBatchQueryWrapper.java
index 4cfee1b..d80b38c 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/Oracle8LOBBatchQueryWrapper.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/Oracle8LOBBatchQueryWrapper.java
@@ -19,6 +19,11 @@
 
 package org.apache.cayenne.dba.oracle;
 
+import org.apache.cayenne.CayenneRuntimeException;
+import org.apache.cayenne.map.DbAttribute;
+import org.apache.cayenne.query.BatchQuery;
+import org.apache.cayenne.query.BatchQueryRow;
+
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.ObjectOutputStream;
@@ -27,11 +32,6 @@ import java.sql.Types;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.cayenne.CayenneRuntimeException;
-import org.apache.cayenne.map.DbAttribute;
-import org.apache.cayenne.query.BatchQuery;
-import org.apache.cayenne.query.BatchQueryRow;
-
 /**
  * Helper class to extract the information from BatchQueries, essential for LOB
  * columns processing.
@@ -147,7 +147,7 @@ class Oracle8LOBBatchQueryWrapper {
 	List<DbAttribute> getDbAttributesForLOBSelectQualifier() {
 
 		int len = qualifierAttributes.length;
-		List<DbAttribute> attributes = new ArrayList<DbAttribute>(len);
+		List<DbAttribute> attributes = new ArrayList<>(len);
 
 		for (int i = 0; i < len; i++) {
 			if (this.qualifierAttributes[i]) {
@@ -165,7 +165,7 @@ class Oracle8LOBBatchQueryWrapper {
 	List<DbAttribute> getDbAttributesForUpdatedLOBColumns() {
 
 		int len = updatedLOBAttributes.length;
-		List<DbAttribute> attributes = new ArrayList<DbAttribute>(len);
+		List<DbAttribute> attributes = new ArrayList<>(len);
 
 		for (int i = 0; i < len; i++) {
 			if (this.updatedLOBAttributes[i] != null) {
@@ -178,7 +178,7 @@ class Oracle8LOBBatchQueryWrapper {
 	List<Object> getValuesForLOBSelectQualifier(BatchQueryRow row) {
 
 		int len = this.qualifierAttributes.length;
-		List<Object> values = new ArrayList<Object>(len);
+		List<Object> values = new ArrayList<>(len);
 		for (int i = 0; i < len; i++) {
 			if (this.qualifierAttributes[i]) {
 				values.add(row.getValue(i));
@@ -191,7 +191,7 @@ class Oracle8LOBBatchQueryWrapper {
 	List<Object> getValuesForUpdatedLOBColumns() {
 
 		int len = this.updatedLOBAttributes.length;
-		List<Object> values = new ArrayList<Object>(len);
+		List<Object> values = new ArrayList<>(len);
 		for (int i = 0; i < len; i++) {
 			if (this.updatedLOBAttributes[i] != null) {
 				values.add(this.updatedLOBAttributes[i]);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/Oracle8LOBInsertBatchTranslator.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/Oracle8LOBInsertBatchTranslator.java b/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/Oracle8LOBInsertBatchTranslator.java
index acdaf1c..dfe642d 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/Oracle8LOBInsertBatchTranslator.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/Oracle8LOBInsertBatchTranslator.java
@@ -19,16 +19,16 @@
 
 package org.apache.cayenne.dba.oracle;
 
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
 import org.apache.cayenne.dba.DbAdapter;
 import org.apache.cayenne.dba.QuotingStrategy;
 import org.apache.cayenne.map.DbAttribute;
 import org.apache.cayenne.query.BatchQueryRow;
 import org.apache.cayenne.query.InsertBatchQuery;
 
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
 class Oracle8LOBInsertBatchTranslator extends Oracle8LOBBatchTranslator {
 
     Oracle8LOBInsertBatchTranslator(InsertBatchQuery query, DbAdapter adapter, String trimFunction) {
@@ -40,7 +40,7 @@ class Oracle8LOBInsertBatchTranslator extends Oracle8LOBBatchTranslator {
         List<DbAttribute> dbAttributes = query.getDbAttributes();
         int len = dbAttributes.size();
 
-        List<Object> values = new ArrayList<Object>(len);
+        List<Object> values = new ArrayList<>(len);
         for (int i = 0; i < len; i++) {
             Object value = row.getValue(i);
             DbAttribute attribute = dbAttributes.get(i);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/Oracle8LOBUpdateBatchTranslator.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/Oracle8LOBUpdateBatchTranslator.java b/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/Oracle8LOBUpdateBatchTranslator.java
index 0a8efba..72eaa1b 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/Oracle8LOBUpdateBatchTranslator.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/Oracle8LOBUpdateBatchTranslator.java
@@ -19,16 +19,16 @@
 
 package org.apache.cayenne.dba.oracle;
 
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
 import org.apache.cayenne.dba.DbAdapter;
 import org.apache.cayenne.dba.QuotingStrategy;
 import org.apache.cayenne.map.DbAttribute;
 import org.apache.cayenne.query.BatchQueryRow;
 import org.apache.cayenne.query.UpdateBatchQuery;
 
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
 class Oracle8LOBUpdateBatchTranslator extends Oracle8LOBBatchTranslator {
 
     Oracle8LOBUpdateBatchTranslator(UpdateBatchQuery query, DbAdapter adapter, String trimFunction) {
@@ -40,7 +40,7 @@ class Oracle8LOBUpdateBatchTranslator extends Oracle8LOBBatchTranslator {
         int len = query.getDbAttributes().size();
         UpdateBatchQuery updateBatch = (UpdateBatchQuery) query;
 
-        List<Object> values = new ArrayList<Object>(len);
+        List<Object> values = new ArrayList<>(len);
         List<DbAttribute> qualifierAttributes = updateBatch.getQualifierAttributes();
         List<DbAttribute> updatedDbAttributes = updateBatch.getUpdatedAttributes();
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OraclePkGenerator.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OraclePkGenerator.java b/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OraclePkGenerator.java
index 4c0f630..8cc9c7b 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OraclePkGenerator.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OraclePkGenerator.java
@@ -19,6 +19,14 @@
 
 package org.apache.cayenne.dba.oracle;
 
+import org.apache.cayenne.CayenneRuntimeException;
+import org.apache.cayenne.access.DataNode;
+import org.apache.cayenne.dba.JdbcAdapter;
+import org.apache.cayenne.dba.JdbcPkGenerator;
+import org.apache.cayenne.map.DataMap;
+import org.apache.cayenne.map.DbEntity;
+import org.apache.cayenne.map.DbKeyGenerator;
+
 import java.sql.Connection;
 import java.sql.ResultSet;
 import java.sql.SQLException;
@@ -28,14 +36,6 @@ import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.cayenne.CayenneRuntimeException;
-import org.apache.cayenne.access.DataNode;
-import org.apache.cayenne.dba.JdbcAdapter;
-import org.apache.cayenne.dba.JdbcPkGenerator;
-import org.apache.cayenne.map.DataMap;
-import org.apache.cayenne.map.DbEntity;
-import org.apache.cayenne.map.DbKeyGenerator;
-
 /**
  * Sequence-based primary key generator implementation for Oracle. Uses Oracle
  * sequences to generate primary key values. This approach is at least 50%
@@ -76,7 +76,7 @@ public class OraclePkGenerator extends JdbcPkGenerator {
 
 	@Override
 	public List createAutoPkStatements(List dbEntities) {
-		List<String> list = new ArrayList<String>();
+		List<String> list = new ArrayList<>();
 		Iterator it = dbEntities.iterator();
 		while (it.hasNext()) {
 			DbEntity ent = (DbEntity) it.next();
@@ -113,7 +113,7 @@ public class OraclePkGenerator extends JdbcPkGenerator {
 
 	@Override
 	public List dropAutoPkStatements(List dbEntities) {
-		List<String> list = new ArrayList<String>();
+		List<String> list = new ArrayList<>();
 		Iterator it = dbEntities.iterator();
 		while (it.hasNext()) {
 			DbEntity ent = (DbEntity) it.next();
@@ -227,7 +227,7 @@ public class OraclePkGenerator extends JdbcPkGenerator {
 				adapter.getJdbcEventLogger().logQuery(sql, Collections.EMPTY_LIST);
 
 				try (ResultSet rs = sel.executeQuery(sql);) {
-					List<String> sequenceList = new ArrayList<String>();
+					List<String> sequenceList = new ArrayList<>();
 					while (rs.next()) {
 						sequenceList.add(rs.getString(1));
 					}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleQualifierTranslator.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleQualifierTranslator.java b/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleQualifierTranslator.java
index 1ace92e..3d14765 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleQualifierTranslator.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleQualifierTranslator.java
@@ -18,9 +18,6 @@
  ****************************************************************/
 package org.apache.cayenne.dba.oracle;
 
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.cayenne.access.translator.select.QueryAssembler;
 import org.apache.cayenne.access.translator.select.TrimmingQualifierTranslator;
 import org.apache.cayenne.exp.Expression;
@@ -31,6 +28,9 @@ import org.apache.cayenne.exp.parser.ASTNotIn;
 import org.apache.cayenne.exp.parser.ASTPath;
 import org.apache.commons.collections.Transformer;
 
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * Oracle qualifier translator. In particular, trims INs with more than 1000
  * elements to an OR-set of INs with &lt;= 1000 elements
@@ -70,13 +70,13 @@ public class OracleQualifierTranslator extends TrimmingQualifierTranslator {
 		Expression trimmedInExpression(ASTPath path, Object[] values, int maxInSize) {
 			Expression res = null;
 
-			List<Object> in = new ArrayList<Object>(maxInSize);
+			List<Object> in = new ArrayList<>(maxInSize);
 			for (Object v : values) {
 				in.add(v);
 				if (in.size() == maxInSize) {
 					Expression inExp = new ASTIn(path, new ASTList(in));
 					res = res != null ? res.orExp(inExp) : inExp;
-					in = new ArrayList<Object>(maxInSize);
+					in = new ArrayList<>(maxInSize);
 				}
 			}
 			if (in.size() > 0) {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresPkGenerator.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresPkGenerator.java b/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresPkGenerator.java
index 429bc25..877fc33 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresPkGenerator.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/postgres/PostgresPkGenerator.java
@@ -19,6 +19,13 @@
 
 package org.apache.cayenne.dba.postgres;
 
+import org.apache.cayenne.CayenneRuntimeException;
+import org.apache.cayenne.access.DataNode;
+import org.apache.cayenne.dba.JdbcAdapter;
+import org.apache.cayenne.dba.oracle.OraclePkGenerator;
+import org.apache.cayenne.map.DbEntity;
+import org.apache.cayenne.map.DbKeyGenerator;
+
 import java.sql.Connection;
 import java.sql.ResultSet;
 import java.sql.SQLException;
@@ -27,13 +34,6 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
-import org.apache.cayenne.CayenneRuntimeException;
-import org.apache.cayenne.access.DataNode;
-import org.apache.cayenne.dba.JdbcAdapter;
-import org.apache.cayenne.dba.oracle.OraclePkGenerator;
-import org.apache.cayenne.map.DbEntity;
-import org.apache.cayenne.map.DbKeyGenerator;
-
 /**
  * Default PK generator for PostgreSQL that uses sequences for PK generation.
  */
@@ -101,7 +101,7 @@ public class PostgresPkGenerator extends OraclePkGenerator {
 				adapter.getJdbcEventLogger().logQuery(sql, Collections.EMPTY_LIST);
 
 				try (ResultSet rs = sel.executeQuery(sql);) {
-					List<String> sequenceList = new ArrayList<String>();
+					List<String> sequenceList = new ArrayList<>();
 					while (rs.next()) {
 						sequenceList.add(rs.getString(1));
 					}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerProcedureAction.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerProcedureAction.java b/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerProcedureAction.java
index 256f68d..18b5d43 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerProcedureAction.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerProcedureAction.java
@@ -19,13 +19,6 @@
 
 package org.apache.cayenne.dba.sqlserver;
 
-import java.sql.CallableStatement;
-import java.sql.Connection;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.cayenne.ObjectId;
 import org.apache.cayenne.ResultIterator;
 import org.apache.cayenne.access.DataNode;
@@ -36,6 +29,13 @@ import org.apache.cayenne.access.translator.procedure.ProcedureTranslator;
 import org.apache.cayenne.query.ProcedureQuery;
 import org.apache.cayenne.query.Query;
 
+import java.sql.CallableStatement;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * ProcedureAction for SQLServer MS JDBC driver. Customizes OUT parameter
  * processing - it has to be done AFTER the ResultSets are read (note that jTDS
@@ -143,7 +143,7 @@ public class SQLServerProcedureAction extends ProcedureAction {
 			// does not delegate to wrapped observer
 			// but instead caches results locally.
 			if (counts == null) {
-				counts = new ArrayList<Integer>();
+				counts = new ArrayList<>();
 			}
 
 			counts.add(Integer.valueOf(resultCount));
@@ -154,7 +154,7 @@ public class SQLServerProcedureAction extends ProcedureAction {
 			// does not delegate to wrapped observer
 			// but instead caches results locally.
 			if (results == null) {
-				results = new ArrayList<List<?>>();
+				results = new ArrayList<>();
 			}
 
 			results.add(dataRows);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerTrimmingQualifierTranslator.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerTrimmingQualifierTranslator.java b/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerTrimmingQualifierTranslator.java
index 0b4fa68..fd9a191 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerTrimmingQualifierTranslator.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerTrimmingQualifierTranslator.java
@@ -18,15 +18,15 @@
  ****************************************************************/
 package org.apache.cayenne.dba.sqlserver;
 
-import java.sql.Types;
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.cayenne.access.translator.select.QueryAssembler;
 import org.apache.cayenne.access.translator.select.TrimmingQualifierTranslator;
 import org.apache.cayenne.exp.Expression;
 import org.apache.cayenne.map.DbAttribute;
 
+import java.sql.Types;
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * @since 3.0
  */
@@ -41,7 +41,7 @@ class SQLServerTrimmingQualifierTranslator extends TrimmingQualifierTranslator {
 
 	SQLServerTrimmingQualifierTranslator(QueryAssembler queryAssembler, String trimFunction) {
 		super(queryAssembler, trimFunction);
-		expressionStack = new ArrayList<Expression>();
+		expressionStack = new ArrayList<>();
 	}
 
 	@Override

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/dba/sybase/SybasePkGenerator.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/dba/sybase/SybasePkGenerator.java b/cayenne-server/src/main/java/org/apache/cayenne/dba/sybase/SybasePkGenerator.java
index 6e73561..e08a099 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/dba/sybase/SybasePkGenerator.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/dba/sybase/SybasePkGenerator.java
@@ -19,12 +19,6 @@
 
 package org.apache.cayenne.dba.sybase;
 
-import java.sql.CallableStatement;
-import java.sql.Connection;
-import java.sql.ResultSet;
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.cayenne.CayenneRuntimeException;
 import org.apache.cayenne.access.DataNode;
 import org.apache.cayenne.dba.JdbcAdapter;
@@ -33,6 +27,12 @@ import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.tx.BaseTransaction;
 import org.apache.cayenne.tx.Transaction;
 
+import java.sql.CallableStatement;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * Primary key generator implementation for Sybase. Uses a lookup table named
  * "AUTO_PK_SUPPORT" and a stored procedure "auto_pk_for_table" to search and
@@ -137,7 +137,7 @@ public class SybasePkGenerator extends JdbcPkGenerator {
 
 	@Override
 	public List<String> dropAutoPkStatements(List<DbEntity> dbEntities) {
-		List<String> list = new ArrayList<String>();
+		List<String> list = new ArrayList<>();
 		list.add(safePkProcDrop());
 		list.add(safePkTableDrop());
 		return list;

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/ejbql/parser/Compiler.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/ejbql/parser/Compiler.java b/cayenne-server/src/main/java/org/apache/cayenne/ejbql/parser/Compiler.java
index aae5e17..f26163b 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/ejbql/parser/Compiler.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/ejbql/parser/Compiler.java
@@ -378,7 +378,7 @@ class Compiler {
 
     private void addPath(EJBQLPath path) {
         if (paths == null) {
-            paths = new ArrayList<EJBQLPath>();
+            paths = new ArrayList<>();
         }
 
         paths.add(path);
@@ -635,7 +635,7 @@ class Compiler {
         private void addEntityResult(EJBQLExpression expression) {
             if (appendingResultColumns) {
                 if (resultComponents == null) {
-                    resultComponents = new ArrayList<Object>();
+                    resultComponents = new ArrayList<>();
                 }
 
                 // defer EntityResult creation until we resolve all ids...
@@ -646,7 +646,7 @@ class Compiler {
         private void addResultSetColumn() {
             if (appendingResultColumns) {
                 if (resultComponents == null) {
-                    resultComponents = new ArrayList<Object>();
+                    resultComponents = new ArrayList<>();
                 }
 
                 String column = "sc" + resultComponents.size();

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/event/DefaultEventManager.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/event/DefaultEventManager.java b/cayenne-server/src/main/java/org/apache/cayenne/event/DefaultEventManager.java
index f0b35b7..8dcff30 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/event/DefaultEventManager.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/event/DefaultEventManager.java
@@ -18,6 +18,10 @@
  ****************************************************************/
 package org.apache.cayenne.event;
 
+import org.apache.cayenne.CayenneRuntimeException;
+import org.apache.cayenne.di.BeforeScopeEnd;
+import org.apache.cayenne.util.Invocation;
+
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.EventObject;
@@ -26,10 +30,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.WeakHashMap;
 
-import org.apache.cayenne.CayenneRuntimeException;
-import org.apache.cayenne.di.BeforeScopeEnd;
-import org.apache.cayenne.util.Invocation;
-
 /**
  * A default implementation of {@link EventManager}.
  * 
@@ -65,7 +65,7 @@ public class DefaultEventManager implements EventManager {
         this.singleThread = dispatchThreadCount <= 0;
 
         if (!singleThread) {
-            dispatchThreads = new ArrayList<DispatchThread>(dispatchThreadCount);
+            dispatchThreads = new ArrayList<>(dispatchThreadCount);
 
             String prefix = "cayenne-edt-" + hashCode() + "-";
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/event/EventBridge.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/event/EventBridge.java b/cayenne-server/src/main/java/org/apache/cayenne/event/EventBridge.java
index 3ef5721..83a5d68 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/event/EventBridge.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/event/EventBridge.java
@@ -19,14 +19,14 @@
 
 package org.apache.cayenne.event;
 
+import org.apache.cayenne.util.Util;
+
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.EventListener;
 import java.util.HashSet;
 
-import org.apache.cayenne.util.Util;
-
 /**
  * <p>An object that passes events between a local EventManager and some other event dispatch
  * mechanism. The most common example is sending local events to remote JVMs and receiving
@@ -227,7 +227,7 @@ public abstract class EventBridge implements EventListener {
 
         if (receivesLocalEvents() && !localSubjects.isEmpty()) {
 
-            listeners = new ArrayList<SubjectListener>(localSubjects.size());
+            listeners = new ArrayList<>(localSubjects.size());
 
             for (EventSubject subject : localSubjects) {
                 SubjectListener listener = new SubjectListener(subject);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/exp/ExpressionFactory.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/exp/ExpressionFactory.java b/cayenne-server/src/main/java/org/apache/cayenne/exp/ExpressionFactory.java
index 1ffefef..16380e4 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/exp/ExpressionFactory.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/exp/ExpressionFactory.java
@@ -212,7 +212,7 @@ public class ExpressionFactory {
 	 * join pair binary expressions.
 	 */
 	public static Expression matchAnyDbExp(Map<String, ?> map, int pairType) {
-		List<Expression> pairs = new ArrayList<Expression>(map.size());
+		List<Expression> pairs = new ArrayList<>(map.size());
 
 		for (Map.Entry<String, ?> entry : map.entrySet()) {
 			Expression exp = expressionOfType(pairType);
@@ -233,7 +233,7 @@ public class ExpressionFactory {
 	 * join pair binary expressions.
 	 */
 	public static Expression matchAllDbExp(Map<String, ?> map, int pairType) {
-		List<Expression> pairs = new ArrayList<Expression>(map.size());
+		List<Expression> pairs = new ArrayList<>(map.size());
 
 		for (Map.Entry<String, ?> entry : map.entrySet()) {
 			Expression exp = expressionOfType(pairType);
@@ -254,7 +254,7 @@ public class ExpressionFactory {
 	 * join pair binary expressions.
 	 */
 	public static Expression matchAnyExp(Map<String, ?> map, int pairType) {
-		List<Expression> pairs = new ArrayList<Expression>(map.size());
+		List<Expression> pairs = new ArrayList<>(map.size());
 
 		for (Map.Entry<String, ?> entry : map.entrySet()) {
 
@@ -309,7 +309,7 @@ public class ExpressionFactory {
 
 		int split = path.indexOf(SPLIT_SEPARATOR);
 
-		List<Expression> matches = new ArrayList<Expression>(values.length);
+		List<Expression> matches = new ArrayList<>(values.length);
 
 		if (split >= 0 && split < path.length() - 1) {
 
@@ -354,7 +354,7 @@ public class ExpressionFactory {
 	 * join pair binary expressions.
 	 */
 	public static Expression matchAllExp(Map<String, ?> map, int pairType) {
-		List<Expression> pairs = new ArrayList<Expression>(map.size());
+		List<Expression> pairs = new ArrayList<>(map.size());
 
 		for (Map.Entry<String, ?> entry : map.entrySet()) {
 
@@ -962,7 +962,7 @@ public class ExpressionFactory {
 			return expFalse();
 		}
 
-		List<Expression> pairs = new ArrayList<Expression>(objects.length);
+		List<Expression> pairs = new ArrayList<>(objects.length);
 
 		for (Persistent object : objects) {
 			pairs.add(matchExp(object));

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/exp/Property.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/exp/Property.java b/cayenne-server/src/main/java/org/apache/cayenne/exp/Property.java
index b9ae1c6..a340b50 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/exp/Property.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/exp/Property.java
@@ -18,16 +18,16 @@
  ****************************************************************/
 package org.apache.cayenne.exp;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
 import org.apache.cayenne.exp.parser.ASTObjPath;
 import org.apache.cayenne.query.Ordering;
 import org.apache.cayenne.query.PrefetchTreeNode;
 import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.reflect.PropertyUtils;
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
 /**
  * <p>
  * A property in a DataObject.
@@ -412,7 +412,7 @@ public class Property<E> {
      * @return Ascending sort orderings on this property.
      */
     public List<Ordering> ascs() {
-        List<Ordering> result = new ArrayList<Ordering>(1);
+        List<Ordering> result = new ArrayList<>(1);
         result.add(asc());
         return result;
     }
@@ -428,7 +428,7 @@ public class Property<E> {
      * @return Ascending case insensitive sort orderings on this property.
      */
     public List<Ordering> ascInsensitives() {
-        List<Ordering> result = new ArrayList<Ordering>(1);
+        List<Ordering> result = new ArrayList<>(1);
         result.add(ascInsensitive());
         return result;
     }
@@ -444,7 +444,7 @@ public class Property<E> {
      * @return Descending sort orderings on this property.
      */
     public List<Ordering> descs() {
-        List<Ordering> result = new ArrayList<Ordering>(1);
+        List<Ordering> result = new ArrayList<>(1);
         result.add(desc());
         return result;
     }
@@ -460,7 +460,7 @@ public class Property<E> {
      * @return Descending case insensitive sort orderings on this property.
      */
     public List<Ordering> descInsensitives() {
-        List<Ordering> result = new ArrayList<Ordering>(1);
+        List<Ordering> result = new ArrayList<>(1);
         result.add(descInsensitive());
         return result;
     }
@@ -508,7 +508,7 @@ public class Property<E> {
      * dot-separated property name path.
      */
     public List<E> getFromAll(Collection<?> beans) {
-        List<E> result = new ArrayList<E>(beans.size());
+        List<E> result = new ArrayList<>(beans.size());
         for (Object bean : beans) {
             result.add(getFrom(bean));
         }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/cee0b77d/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTList.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTList.java b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTList.java
index b08ab96..806bb18 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTList.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/exp/parser/ASTList.java
@@ -19,15 +19,15 @@
 
 package org.apache.cayenne.exp.parser;
 
+import org.apache.cayenne.Persistent;
+import org.apache.cayenne.exp.Expression;
+
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.cayenne.Persistent;
-import org.apache.cayenne.exp.Expression;
-
 /**
  * A leaf expression representing an immutable collection of values.
  * 
@@ -185,7 +185,7 @@ public class ASTList extends SimpleNode {
 			Collection<?> c = (Collection<?>) value;
 			this.values = c.toArray(new Object[c.size()]);
 		} else if (value instanceof Iterator) {
-			List<Object> values = new ArrayList<Object>();
+			List<Object> values = new ArrayList<>();
 			Iterator<?> it = (Iterator<?>) value;
 			while (it.hasNext()) {
 				values.add(it.next());


Mime
View raw message