svn commit: r1857906 [7/9] - in /ofbiz/ofbiz-framework/trunk: applications/accounting/src/main/java/org/apache/ofbiz/accounting/agreement/ applications/accounting/src/main/java/org/apache/ofbiz/accounting/test/ applications/accounting/src/main/java/org...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1857906 [7/9] - in /ofbiz/ofbiz-framework/trunk: applications/accounting/src/main/java/org/apache/ofbiz/accounting/agreement/ applications/accounting/src/main/java/org/apache/ofbiz/accounting/test/ applications/accounting/src/main/java/org...

mthl
Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java Sun Apr 21 12:49:52 2019
@@ -172,8 +172,8 @@ public class DatabaseUtil {
 
         // get ALL tables from this database
         TreeSet<String> tableNames = this.getTableNames(messages);
-        TreeSet<String> fkTableNames = tableNames == null ? null : new TreeSet<String>(tableNames);
-        TreeSet<String> indexTableNames = tableNames == null ? null : new TreeSet<String>(tableNames);
+        TreeSet<String> fkTableNames = tableNames == null ? null : new TreeSet<>(tableNames);
+        TreeSet<String> indexTableNames = tableNames == null ? null : new TreeSet<>(tableNames);
 
         if (tableNames == null) {
             String message = "Could not get table name information from the database, aborting.";
@@ -202,12 +202,12 @@ public class DatabaseUtil {
 
         timer.timerString("Before Individual Table/Column Check");
 
-        List<ModelEntity> modelEntityList = new ArrayList<ModelEntity>(modelEntities.values());
+        List<ModelEntity> modelEntityList = new ArrayList<>(modelEntities.values());
         // sort using compareTo method on ModelEntity
         Collections.sort(modelEntityList);
         int curEnt = 0;
         int totalEnt = modelEntityList.size();
-        List<ModelEntity> entitiesAdded = new LinkedList<ModelEntity>();
+        List<ModelEntity> entitiesAdded = new LinkedList<>();
         String schemaName;
         try {
             schemaName = getSchemaName(messages);
@@ -217,7 +217,7 @@ public class DatabaseUtil {
             Debug.logError(message, module);
             return;
         }
-        List<Future<CreateTableCallable>> tableFutures = new LinkedList<Future<CreateTableCallable>>();
+        List<Future<CreateTableCallable>> tableFutures = new LinkedList<>();
         for (ModelEntity entity: modelEntityList) {
             curEnt++;
 
@@ -252,7 +252,7 @@ public class DatabaseUtil {
             if (tableNames.contains(tableName)) {
                 tableNames.remove(tableName);
 
-                Map<String, ModelField> fieldColNames = new HashMap<String, ModelField>();
+                Map<String, ModelField> fieldColNames = new HashMap<>();
                 Iterator<ModelField> fieldIter = entity.getFieldsIterator();
                 while (fieldIter.hasNext()) {
                     ModelField field = fieldIter.next();
@@ -425,7 +425,7 @@ public class DatabaseUtil {
         // for each newly added table, add fk indices
         if (datasourceInfo.getUseForeignKeyIndices()) {
             int totalFkIndices = 0;
-            List<Future<AbstractCountingCallable>> fkIndicesFutures = new LinkedList<Future<AbstractCountingCallable>>();
+            List<Future<AbstractCountingCallable>> fkIndicesFutures = new LinkedList<>();
             for (ModelEntity curEntity: entitiesAdded) {
                 if (curEntity.getRelationsOneSize() > 0) {
                     fkIndicesFutures.add(executor.submit(new AbstractCountingCallable(curEntity, modelEntities) {
@@ -454,7 +454,7 @@ public class DatabaseUtil {
         // for each newly added table, add declared indexes
         if (datasourceInfo.getUseIndices()) {
             int totalDis = 0;
-            List<Future<AbstractCountingCallable>> disFutures = new LinkedList<Future<AbstractCountingCallable>>();
+            List<Future<AbstractCountingCallable>> disFutures = new LinkedList<>();
             for (ModelEntity curEntity: entitiesAdded) {
                 if (curEntity.getIndexesSize() > 0) {
                     disFutures.add(executor.submit(new AbstractCountingCallable(curEntity,  modelEntities) {
@@ -720,12 +720,12 @@ public class DatabaseUtil {
         // go through each table and make a ModelEntity object, add to list
         // for each entity make corresponding ModelField objects
         // then print out XML for the entities/fields
-        List<ModelEntity> newEntList = new LinkedList<ModelEntity>();
+        List<ModelEntity> newEntList = new LinkedList<>();
 
         boolean isCaseSensitive = getIsCaseSensitive(messages);
 
         // iterate over the table names is alphabetical order
-        for (String tableName: new TreeSet<String>(colInfo.keySet())) {
+        for (String tableName: new TreeSet<>(colInfo.keySet())) {
             Map<String, ColumnCheckInfo> colMap = colInfo.get(tableName);
             ModelEntity newEntity = new ModelEntity(tableName, colMap, modelFieldTypeReader, isCaseSensitive);
             newEntList.add(newEntity);
@@ -777,7 +777,7 @@ public class DatabaseUtil {
         return dbData;
     }
 
-    private static final List<Detection> detections = new ArrayList<Detection>();
+    private static final List<Detection> detections = new ArrayList<>();
     private static final String goodFormatStr;
     private static final String badFormatStr;
 
@@ -922,7 +922,7 @@ public class DatabaseUtil {
         if (Debug.infoOn()) Debug.logInfo("Getting Table Info From Database", module);
 
         // get ALL tables from this database
-        TreeSet<String> tableNames = new TreeSet<String>();
+        TreeSet<String> tableNames = new TreeSet<>();
         ResultSet tableSet = null;
 
         String lookupSchemaName = null;
@@ -1029,7 +1029,7 @@ public class DatabaseUtil {
     private Map<String, Map<String, ColumnCheckInfo>> getColumnInfo(Set<String> tableNames, boolean getPks, Collection<String> messages, ExecutorService executor) {
         // if there are no tableNames, don't even try to get the columns
         if (tableNames.size() == 0) {
-            return new HashMap<String, Map<String, ColumnCheckInfo>>();
+            return new HashMap<>();
         }
 
         Connection connection = null;
@@ -1059,7 +1059,7 @@ public class DatabaseUtil {
 
             if (Debug.infoOn()) Debug.logInfo("Getting Column Info From Database", module);
 
-            Map<String, Map<String, ColumnCheckInfo>> colInfo = new HashMap<String, Map<String, ColumnCheckInfo>>();
+            Map<String, Map<String, ColumnCheckInfo>> colInfo = new HashMap<>();
             try {
                 String lookupSchemaName = getSchemaName(dbData);
                 boolean needsUpperCase = false;
@@ -1114,7 +1114,7 @@ public class DatabaseUtil {
 
                             Map<String, ColumnCheckInfo> tableColInfo = colInfo.get(ccInfo.tableName);
                             if (tableColInfo == null) {
-                                tableColInfo = new HashMap<String, ColumnCheckInfo>();
+                                tableColInfo = new HashMap<>();
                                 colInfo.put(ccInfo.tableName, tableColInfo);
                             }
                             tableColInfo.put(ccInfo.columnName, ccInfo);
@@ -1153,7 +1153,7 @@ public class DatabaseUtil {
                     }
                     if (pkCount == 0) {
                         Debug.logInfo("Searching in " + tableNames.size() + " tables for primary key fields ...", module);
-                        List<Future<AbstractCountingCallable>> pkFetcherFutures = new LinkedList<Future<AbstractCountingCallable>>();
+                        List<Future<AbstractCountingCallable>> pkFetcherFutures = new LinkedList<>();
                         for (String curTable: tableNames) {
                             curTable = curTable.substring(curTable.indexOf('.') + 1); //cut off schema name
                             pkFetcherFutures.add(executor.submit(createPrimaryKeyFetcher(dbData, lookupSchemaName, needsUpperCase, colInfo, messages, curTable)));
@@ -1266,7 +1266,7 @@ public class DatabaseUtil {
 
         if (Debug.infoOn()) Debug.logInfo("Getting Foreign Key (Reference) Info From Database", module);
 
-        Map<String, Map<String, ReferenceCheckInfo>> refInfo = new HashMap<String, Map<String, ReferenceCheckInfo>>();
+        Map<String, Map<String, ReferenceCheckInfo>> refInfo = new HashMap<>();
 
         try {
             // ResultSet rsCols = dbData.getCrossReference(null, null, null, null, null, null);
@@ -1323,7 +1323,7 @@ public class DatabaseUtil {
 
                     Map<String, ReferenceCheckInfo> tableRefInfo = refInfo.get(rcInfo.fkTableName);
                     if (tableRefInfo == null) {
-                        tableRefInfo = new HashMap<String, ReferenceCheckInfo>();
+                        tableRefInfo = new HashMap<>();
                         refInfo.put(rcInfo.fkTableName, tableRefInfo);
                         if (Debug.verboseOn()) Debug.logVerbose("Adding new Map for table: " + rcInfo.fkTableName, module);
                     }
@@ -1400,7 +1400,7 @@ public class DatabaseUtil {
 
         if (Debug.infoOn()) Debug.logInfo("Getting Index Info From Database", module);
 
-        Map<String, Set<String>> indexInfo = new HashMap<String, Set<String>>();
+        Map<String, Set<String>> indexInfo = new HashMap<>();
         try {
             int totalIndices = 0;
             String lookupSchemaName = getSchemaName(dbData);
@@ -1445,7 +1445,7 @@ public class DatabaseUtil {
 
                         Set<String> tableIndexList = indexInfo.get(tableName);
                         if (tableIndexList == null) {
-                            tableIndexList = new TreeSet<String>();
+                            tableIndexList = new TreeSet<>();
                             indexInfo.put(tableName, tableIndexList);
                             if (Debug.verboseOn()) Debug.logVerbose("Adding new Map for table: " + tableName, module);
                         }
@@ -1535,7 +1535,7 @@ public class DatabaseUtil {
     private abstract class AbstractCountingCallable implements Callable<AbstractCountingCallable> {
         protected final ModelEntity entity;
         protected final Map<String, ModelEntity> modelEntities;
-        protected final List<String> messages = new LinkedList<String>();
+        protected final List<String> messages = new LinkedList<>();
         protected int count;
 
         protected AbstractCountingCallable(ModelEntity entity, Map<String, ModelEntity> modelEntities) {
@@ -1890,7 +1890,7 @@ public class DatabaseUtil {
             return;
         }
 
-        if (messages == null) messages = new ArrayList<String>();
+        if (messages == null) messages = new ArrayList<>();
 
         for (String fieldInfo: fieldsWrongSize) {
             String entityName = fieldInfo.substring(0, fieldInfo.indexOf('.'));
@@ -2190,7 +2190,7 @@ public class DatabaseUtil {
     /* ====================================================================== */
     /* ====================================================================== */
     public void createPrimaryKey(ModelEntity entity, boolean usePkConstraintNames, int constraintNameClipLength, List<String> messages) {
-        if (messages == null) messages = new ArrayList<String>();
+        if (messages == null) messages = new ArrayList<>();
         String err = createPrimaryKey(entity, usePkConstraintNames, constraintNameClipLength);
         if (UtilValidate.isNotEmpty(err)) {
             messages.add(err);
@@ -2249,7 +2249,7 @@ public class DatabaseUtil {
     }
 
     public void deletePrimaryKey(ModelEntity entity, boolean usePkConstraintNames, int constraintNameClipLength, List<String> messages) {
-        if (messages == null) messages = new ArrayList<String>();
+        if (messages == null) messages = new ArrayList<>();
         String err = deletePrimaryKey(entity, usePkConstraintNames, constraintNameClipLength);
         if (UtilValidate.isNotEmpty(err)) {
             messages.add(err);
@@ -2405,7 +2405,7 @@ public class DatabaseUtil {
     }
 
     public void deleteDeclaredIndices(ModelEntity entity, List<String> messages) {
-        if (messages == null) messages = new ArrayList<String>();
+        if (messages == null) messages = new ArrayList<>();
         String err = deleteDeclaredIndices(entity);
         if (UtilValidate.isNotEmpty(err)) {
             messages.add(err);
@@ -2572,7 +2572,7 @@ public class DatabaseUtil {
     }
 
     public void deleteForeignKeyIndices(ModelEntity entity, List<String> messages) {
-        if (messages == null) messages = new ArrayList<String>();
+        if (messages == null) messages = new ArrayList<>();
         String err = deleteForeignKeyIndices(entity, datasourceInfo.getConstraintNameClipLength());
         if (UtilValidate.isNotEmpty(err)) {
             messages.add(err);

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/JdbcValueHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/JdbcValueHandler.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/JdbcValueHandler.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/JdbcValueHandler.java Sun Apr 21 12:49:52 2019
@@ -54,7 +54,7 @@ public abstract class JdbcValueHandler<T
         for the specified Java type. The JdbcValueHandler instances are
         initialized with the SQL type recommended by Sun/Oracle.
          */
-        Map<String, JdbcValueHandler<?>> result = new HashMap<String, JdbcValueHandler<?>>();
+        Map<String, JdbcValueHandler<?>> result = new HashMap<>();
         // JDBC 1
         result.put("Array", new ArrayJdbcValueHandler(Types.ARRAY));
         result.put("java.sql.Array", new ArrayJdbcValueHandler(Types.ARRAY));
@@ -102,7 +102,7 @@ public abstract class JdbcValueHandler<T
         method must be called with the correct type, or an
         exception will be thrown.
          */
-        Map<String, Integer> result = new HashMap<String, Integer>();
+        Map<String, Integer> result = new HashMap<>();
         // SQL 2003 Data Types
         result.put("ARRAY", Types.ARRAY);
         result.put("BIGINT", Types.BIGINT);

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/SQLProcessor.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/SQLProcessor.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/SQLProcessor.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/SQLProcessor.java Sun Apr 21 12:49:52 2019
@@ -56,7 +56,7 @@ public class SQLProcessor implements Aut
     public static final String module = SQLProcessor.class.getName();
 
     /** Used for testing connections when test is enabled */
-    private static final List<String> CONNECTION_TEST_LIST = new ArrayList<String>();
+    private static final List<String> CONNECTION_TEST_LIST = new ArrayList<>();
     public static final int MAX_CONNECTIONS = 1000;
     public static final boolean ENABLE_TEST = false;
 

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/SqlJdbcUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/SqlJdbcUtil.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/SqlJdbcUtil.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/SqlJdbcUtil.java Sun Apr 21 12:49:52 2019
@@ -72,7 +72,7 @@ public final class SqlJdbcUtil {
     public static final String module = SqlJdbcUtil.class.getName();
 
     private static final int CHAR_BUFFER_SIZE = 4096;
-    private static Map<String, Integer> fieldTypeMap = new HashMap<String, Integer>();
+    private static Map<String, Integer> fieldTypeMap = new HashMap<>();
     static {
         fieldTypeMap.put("java.lang.String", 1);
         fieldTypeMap.put("String", 1);
@@ -141,7 +141,7 @@ public final class SqlJdbcUtil {
                 // view-link and already be in the big join; SO keep a set of all aliases
                 // in the join so far and if the left entity alias isn't there yet, and this
                 // isn't the first one, throw an exception
-                Set<String> joinedAliasSet = new TreeSet<String>();
+                Set<String> joinedAliasSet = new TreeSet<>();
 
                 // TODO: at view-link read time make sure they are ordered properly so that each
                 // left hand alias after the first view-link has already been linked before
@@ -463,9 +463,9 @@ public final class SqlJdbcUtil {
             sql.append(makeFromClause(modelEntity, modelFieldTypeReader, datasourceInfo));
             String viewWhereClause = makeViewWhereClause(modelEntity, datasourceInfo.getJoinStyle());
             ModelViewEntity modelViewEntity = (ModelViewEntity)modelEntity;
-            List<EntityCondition> whereConditions = new LinkedList<EntityCondition>();
-            List<EntityCondition> havingConditions = new LinkedList<EntityCondition>();
-            List<String> orderByList = new LinkedList<String>();
+            List<EntityCondition> whereConditions = new LinkedList<>();
+            List<EntityCondition> havingConditions = new LinkedList<>();
+            List<String> orderByList = new LinkedList<>();
 
             modelViewEntity.populateViewEntityConditionInformation(modelFieldTypeReader, whereConditions, havingConditions, orderByList, null);
             String viewConditionClause;

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/DynamicViewEntity.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/DynamicViewEntity.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/DynamicViewEntity.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/DynamicViewEntity.java Sun Apr 21 12:49:52 2019
@@ -58,22 +58,22 @@ public class DynamicViewEntity {
     protected String title = "";
 
     /** Contains member-entity alias name definitions: key is alias, value is ModelMemberEntity */
-    protected Map<String, ModelMemberEntity> memberModelMemberEntities = new HashMap<String, ModelMemberEntity>();
+    protected Map<String, ModelMemberEntity> memberModelMemberEntities = new HashMap<>();
 
     /** List of alias-alls which act as a shortcut for easily pulling over member entity fields */
-    protected List<ModelAliasAll> aliasAlls = new ArrayList<ModelAliasAll>();
+    protected List<ModelAliasAll> aliasAlls = new ArrayList<>();
 
     /** List of aliases with information in addition to what is in the standard field list */
-    protected List<ModelAlias> aliases = new ArrayList<ModelAlias>();
+    protected List<ModelAlias> aliases = new ArrayList<>();
 
     /** List of fields to group by */
     protected List<String> groupBy;
 
     /** List of view links to define how entities are connected (or "joined") */
-    protected List<ModelViewLink> viewLinks = new ArrayList<ModelViewLink>();
+    protected List<ModelViewLink> viewLinks = new ArrayList<>();
 
     /** relations defining relationships between this entity and other entities */
-    protected List<ModelRelation> relations = new ArrayList<ModelRelation>();
+    protected List<ModelRelation> relations = new ArrayList<>();
 
     public DynamicViewEntity() {
     }

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelField.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelField.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelField.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelField.java Sun Apr 21 12:49:52 2019
@@ -142,7 +142,7 @@ public final class ModelField extends Mo
         List<String>validators = Collections.emptyList();
         List<? extends Element> elementList = UtilXml.childElementList(fieldElement, "validate");
         if (!elementList.isEmpty()) {
-            validators = new ArrayList<String>(elementList.size());
+            validators = new ArrayList<>(elementList.size());
             for (Element validateElement : elementList) {
                 validators.add(validateElement.getAttribute("name").intern());
             }

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelFieldTypeReader.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelFieldTypeReader.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelFieldTypeReader.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelFieldTypeReader.java Sun Apr 21 12:49:52 2019
@@ -50,7 +50,7 @@ public class ModelFieldTypeReader implem
 
     protected static Map<String, ModelFieldType> createFieldTypeCache(Element docElement, String location) {
         docElement.normalize();
-        Map<String, ModelFieldType> fieldTypeMap = new HashMap<String, ModelFieldType>();
+        Map<String, ModelFieldType> fieldTypeMap = new HashMap<>();
         List<? extends Element> fieldTypeList = UtilXml.childElementList(docElement, "field-type-def");
         for (Element curFieldType: fieldTypeList) {
             String fieldTypeName = curFieldType.getAttribute("type");

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelRelation.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelRelation.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelRelation.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelRelation.java Sun Apr 21 12:49:52 2019
@@ -91,7 +91,7 @@ public final class ModelRelation extends
         List<ModelKeyMap >keyMaps = Collections.emptyList();
         List<? extends Element> elementList = UtilXml.childElementList(relationElement, "key-map");
         if (!elementList.isEmpty()) {
-            keyMaps = new ArrayList<ModelKeyMap>(elementList.size());
+            keyMaps = new ArrayList<>(elementList.size());
             for (Element keyMapElement : elementList) {
                 keyMaps.add(new ModelKeyMap(keyMapElement));
             }
@@ -138,7 +138,7 @@ public final class ModelRelation extends
         this.isAutoRelation = isAutoRelation;
         StringBuilder sb = new StringBuilder();
         sb.append(modelEntity == null ? "Unknown" : modelEntity.getEntityName()).append("->").append(title).append(relEntityName).append("[");
-        Set<ModelKeyMap> keyMapSet = new TreeSet<ModelKeyMap>(keyMaps);
+        Set<ModelKeyMap> keyMapSet = new TreeSet<>(keyMaps);
         Iterator<ModelKeyMap> setIter = keyMapSet.iterator();
         while (setIter.hasNext()) {
             ModelKeyMap keyMap = setIter.next();

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelViewEntity.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelViewEntity.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelViewEntity.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelViewEntity.java Sun Apr 21 12:49:52 2019
@@ -553,7 +553,7 @@ public class ModelViewEntity extends Mod
 
             List<String> aliases = containedModelFields.get(alias.getField());
             if (aliases == null) {
-                aliases = new LinkedList<String>();
+                aliases = new LinkedList<>();
                 containedModelFields.put(alias.getField(), aliases);
             }
             aliases.add(alias.getName());

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/Converters.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/Converters.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/Converters.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/Converters.java Sun Apr 21 12:49:52 2019
@@ -80,7 +80,7 @@ public class Converters implements Conve
         }
 
         public JSON convert(GenericValue obj) throws ConversionException {
-            Map<String, Object> fieldMap = new HashMap<String, Object>(obj);
+            Map<String, Object> fieldMap = new HashMap<>(obj);
             fieldMap.put("_DELEGATOR_NAME_", obj.getDelegator().getDelegatorName());
             fieldMap.put("_ENTITY_NAME_", obj.getEntityName());
             try {
@@ -97,7 +97,7 @@ public class Converters implements Conve
         }
 
         public List<GenericValue> convert(GenericValue obj) throws ConversionException {
-            List<GenericValue> tempList = new LinkedList<GenericValue>();
+            List<GenericValue> tempList = new LinkedList<>();
             tempList.add(obj);
             return tempList;
         }
@@ -109,7 +109,7 @@ public class Converters implements Conve
         }
 
         public Set<GenericValue> convert(GenericValue obj) throws ConversionException {
-            Set<GenericValue> tempSet = new HashSet<GenericValue>();
+            Set<GenericValue> tempSet = new HashSet<>();
             tempSet.add(obj);
             return tempSet;
         }

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityCrypto.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityCrypto.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityCrypto.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityCrypto.java Sun Apr 21 12:49:52 2019
@@ -52,7 +52,7 @@ public final class EntityCrypto {
     public static final String module = EntityCrypto.class.getName();
 
     private final Delegator delegator;
-    private final ConcurrentMap<String, byte[]> keyMap = new ConcurrentHashMap<String, byte[]>();
+    private final ConcurrentMap<String, byte[]> keyMap = new ConcurrentHashMap<>();
     private final StorageHandler[] handlers;
 
     public EntityCrypto(Delegator delegator, String kekText) throws EntityCryptoException {

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityDataLoader.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityDataLoader.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityDataLoader.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityDataLoader.java Sun Apr 21 12:49:52 2019
@@ -92,7 +92,7 @@ public class EntityDataLoader {
 
     public static <E> List<URL> getUrlList(String helperName, String componentName, List<E> readerNames) {
         String paths = getPathsString(helperName);
-        List<URL> urlList = new LinkedList<URL>();
+        List<URL> urlList = new LinkedList<>();
 
         // first get files from resources
         if (readerNames != null) {
@@ -167,7 +167,7 @@ public class EntityDataLoader {
                 File loadDir = new File(path);
                 if (loadDir.exists() && loadDir.isDirectory()) {
                     File[] files = loadDir.listFiles();
-                    List<File> tempFileList = new LinkedList<File>();
+                    List<File> tempFileList = new LinkedList<>();
                     if (files != null) {
                         for (File file : files) {
                             if (file.getName().toLowerCase(Locale.getDefault()).endsWith(".xml")) {
@@ -199,9 +199,9 @@ public class EntityDataLoader {
     }
 
     public static List<URL> getUrlByComponentList(String helperName, List<String> components, List<String> readerNames) {
-        List<URL> urlList = new LinkedList<URL>();
+        List<URL> urlList = new LinkedList<>();
         for (String readerName:  readerNames) {
-            List<String> loadReaderNames = new LinkedList<String>();
+            List<String> loadReaderNames = new LinkedList<>();
             loadReaderNames.add(readerName);
             for (String component : components) {
                 urlList.addAll(getUrlList(helperName, component, loadReaderNames));
@@ -212,7 +212,7 @@ public class EntityDataLoader {
 
     public static List<URL> getUrlByComponentList(String helperName, List<String> components) {
         Datasource datasourceInfo = EntityConfig.getDatasource(helperName);
-        List<String> readerNames = new LinkedList<String>();
+        List<String> readerNames = new LinkedList<>();
         for (ReadData readerInfo :  datasourceInfo.getReadDataList()) {
             String readerName = readerInfo.getReaderName();
             // ignore the "tenant" reader if the multitenant property is "N"
@@ -291,7 +291,7 @@ public class EntityDataLoader {
 
             if (baseName != null) {
                 try {
-                    List<GenericValue> toBeStored = new LinkedList<GenericValue>();
+                    List<GenericValue> toBeStored = new LinkedList<>();
                     toBeStored.add(
                         delegator.makeValue(
                             "SecurityPermission",

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityQuery.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityQuery.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityQuery.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityQuery.java Sun Apr 21 12:49:52 2019
@@ -503,7 +503,7 @@ public class EntityQuery {
     }
 
     private EntityCondition makeDateCondition() {
-        List<EntityCondition> conditions = new ArrayList<EntityCondition>();
+        List<EntityCondition> conditions = new ArrayList<>();
         if (UtilValidate.isEmpty(this.filterByFieldNames)) {
             this.filterByDate(filterByDateMoment, "fromDate", "thruDate");
         }
@@ -523,7 +523,7 @@ public class EntityQuery {
     public <T> List<T> getFieldList(final String fieldName) throws GenericEntityException {select(fieldName);
         try (EntityListIterator genericValueEli = queryIterator()) {
             if (Boolean.TRUE.equals(this.distinct)) {
-                Set<T> distinctSet = new HashSet<T>();
+                Set<T> distinctSet = new HashSet<>();
                 GenericValue value = null;
                 while ((value = genericValueEli.next()) != null) {
                     T fieldValue = UtilGenerics.<T>cast(value.get(fieldName));
@@ -531,10 +531,10 @@ public class EntityQuery {
                         distinctSet.add(fieldValue);
                     }
                 }
-                return new ArrayList<T>(distinctSet);
+                return new ArrayList<>(distinctSet);
             }
             else {
-                List<T> fieldList = new LinkedList<T>();
+                List<T> fieldList = new LinkedList<>();
                 GenericValue value = null;
                 while ((value = genericValueEli.next()) != null) {
                     T fieldValue = UtilGenerics.<T>cast(value.get(fieldName));

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntitySaxReader.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntitySaxReader.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntitySaxReader.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntitySaxReader.java Sun Apr 21 12:49:52 2019
@@ -161,7 +161,7 @@ public class EntitySaxReader extends Def
 
     public List<Object> getMessageList() {
         if (this.checkDataOnly && this.messageList == null) {
-            messageList = new LinkedList<Object>();
+            messageList = new LinkedList<>();
         }
         return this.messageList;
     }
@@ -322,7 +322,7 @@ public class EntitySaxReader extends Def
                     Template template = new Template("FMImportFilter", templateReader, config);
                     NodeModel nodeModel = NodeModel.wrap(this.rootNodeForTemplate);
 
-                    Map<String, Object> context = new HashMap<String, Object>();
+                    Map<String, Object> context = new HashMap<>();
                     TemplateHashModel staticModels = FreeMarkerWorker.getDefaultOfbizWrapper().getStaticModels();
                     context.put("Static", staticModels);
 

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityTypeUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityTypeUtil.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityTypeUtil.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityTypeUtil.java Sun Apr 21 12:49:52 2019
@@ -82,7 +82,7 @@ public final class EntityTypeUtil {
 
     public static List<GenericValue> getDescendantTypes(GenericValue typeValue) {
         // assumes Child relation is "Child<entityName>"
-        List<GenericValue> descendantTypes = new ArrayList<GenericValue>();
+        List<GenericValue> descendantTypes = new ArrayList<>();
 
         // first get all childrenTypes ...
         List<GenericValue> childrenTypes = null;

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityUtil.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityUtil.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityUtil.java Sun Apr 21 12:49:52 2019
@@ -63,7 +63,7 @@ public final class EntityUtil {
 
     @SafeVarargs
     public static <V> Map<String, V> makeFields(V... args) {
-        Map<String, V> fields = new HashMap<String, V>();
+        Map<String, V> fields = new HashMap<>();
         if (args != null) {
             for (int i = 0; i < args.length;) {
                 if (!(args[i] instanceof String)) throw new IllegalArgumentException("Key(" + i + "), with value(" + args[i] + ") is not a String.");
@@ -197,7 +197,7 @@ public final class EntityUtil {
         if (fromDateName == null) fromDateName = "fromDate";
         if (thruDateName == null) thruDateName = "thruDate";
 
-        List<T> result = new LinkedList<T>();
+        List<T> result = new LinkedList<>();
         Iterator<T> iter = datedValues.iterator();
 
         if (allAreSame) {
@@ -314,9 +314,9 @@ public final class EntityUtil {
      */
     public static <T extends GenericEntity> List<T> localizedOrderBy(Collection<T> values, List<String> orderBy, Locale locale) {
         if (values == null) return null;
-        if (values.isEmpty()) return new ArrayList<T>();
+        if (values.isEmpty()) return new ArrayList<>();
         //force check entity label before order by
-        List<T> localizedValues = new ArrayList<T>();
+        List<T> localizedValues = new ArrayList<>();
         for (T value : values) {
             T newValue = UtilGenerics.cast(value.clone());
             for (String orderByField : orderBy) {
@@ -345,14 +345,14 @@ public final class EntityUtil {
      */
     public static <T extends GenericEntity> List<T> orderBy(Collection<T> values, List<String> orderBy) {
         if (values == null) return null;
-        if (values.isEmpty()) return new ArrayList<T>();
+        if (values.isEmpty()) return new ArrayList<>();
         if (UtilValidate.isEmpty(orderBy)) {
-            List<T> newList = new ArrayList<T>();
+            List<T> newList = new ArrayList<>();
             newList.addAll(values);
             return newList;
         }
 
-        List<T> result = new ArrayList<T>();
+        List<T> result = new ArrayList<>();
         result.addAll(values);
         if (Debug.verboseOn()) Debug.logVerbose("Sorting " + values.size() + " values, orderBy=" + orderBy.toString(), module);
         Collections.sort(result, new OrderByList(orderBy));
@@ -371,7 +371,7 @@ public final class EntityUtil {
     public static List<GenericValue> getRelated(String relationName, Map<String, ? extends Object> fields, List<GenericValue> values, boolean useCache) throws GenericEntityException {
         if (values == null) return null;
 
-        List<GenericValue> result = new LinkedList<GenericValue>();
+        List<GenericValue> result = new LinkedList<>();
         for (GenericValue value: values) {
             result.addAll(value.getRelated(relationName, fields, null, useCache));
         }
@@ -413,7 +413,7 @@ public final class EntityUtil {
             search = null;
             for (GenericValue entity: entities) {
                 if (now.equals(entity.get("fromDate"))) {
-                    search = new HashMap<String, Object>();
+                    search = new HashMap<>();
                     for (Map.Entry<String, ? super Object> entry: entity.getPrimaryKey().entrySet()) {
                         search.put(entry.getKey(), entry.getValue());
                     }
@@ -424,14 +424,14 @@ public final class EntityUtil {
                 entity.store();
             }
             if (search == null) {
-                search = new HashMap<String, Object>();
+                search = new HashMap<>();
                 search.putAll(EntityUtil.getFirst(entities));
             }
         } else {
             /* why is this being done? leaving out for now...
             search = new HashMap(search);
             */
-            search = new HashMap<String, Object>();
+            search = new HashMap<>();
             search.putAll(find);
         }
         if (now.equals(search.get("fromDate"))) {
@@ -472,10 +472,10 @@ public final class EntityUtil {
         if (genericValueEli == null || fieldName == null) {
             return null;
         }
-        List<T> fieldList = new LinkedList<T>();
+        List<T> fieldList = new LinkedList<>();
         Set<T> distinctSet = null;
         if (distinct) {
-            distinctSet = new HashSet<T>();
+            distinctSet = new HashSet<>();
         }
 
         GenericValue value = null;
@@ -537,7 +537,7 @@ public final class EntityUtil {
             endIndex = size;
         }
 
-        return new PagedList<GenericValue>(startIndex, endIndex, size, viewIndex, viewSize, dataItems);
+        return new PagedList<>(startIndex, endIndex, size, viewIndex, viewSize, dataItems);
     }
 
 }

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/SequenceUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/SequenceUtil.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/SequenceUtil.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/SequenceUtil.java Sun Apr 21 12:49:52 2019
@@ -43,7 +43,7 @@ public class SequenceUtil {
 
     public static final String module = SequenceUtil.class.getName();
 
-    private final ConcurrentMap<String, SequenceBank> sequences = new ConcurrentHashMap<String, SequenceBank>();
+    private final ConcurrentMap<String, SequenceBank> sequences = new ConcurrentHashMap<>();
     private final GenericHelperInfo helperInfo;
     private final String tableName;
     private final String nameColName;

Modified: ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/EntityGroupUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/EntityGroupUtil.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/EntityGroupUtil.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/EntityGroupUtil.java Sun Apr 21 12:49:52 2019
@@ -41,7 +41,7 @@ public final class EntityGroupUtil {
     private EntityGroupUtil () {}
 
     public static Set<String> getEntityNamesByGroup(String entityGroupId, Delegator delegator, boolean requireStampFields) throws GenericEntityException {
-        Set<String> entityNames = new HashSet<String>();
+        Set<String> entityNames = new HashSet<>();
 
         List<GenericValue> entitySyncGroupIncludes = EntityQuery.use(delegator).from("EntityGroupEntry").where("entityGroupId", entityGroupId).queryList();
         List<ModelEntity> modelEntities = getModelEntitiesFromRecords(entitySyncGroupIncludes, delegator, requireStampFields);
@@ -53,7 +53,7 @@ public final class EntityGroupUtil {
     }
 
     public static List<ModelEntity> getModelEntitiesFromRecords(List<GenericValue> entityGroupEntryValues, Delegator delegator, boolean requireStampFields) throws GenericEntityException {
-        List<ModelEntity> entityModelToUseList = new LinkedList<ModelEntity>();
+        List<ModelEntity> entityModelToUseList = new LinkedList<>();
 
         for (String entityName: delegator.getModelReader().getEntityNames()) {
             ModelEntity modelEntity = delegator.getModelEntity(entityName);

Modified: ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/data/EntityDataLoadContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/data/EntityDataLoadContainer.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/data/EntityDataLoadContainer.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/data/EntityDataLoadContainer.java Sun Apr 21 12:49:52 2019
@@ -137,7 +137,7 @@ public class EntityDataLoadContainer imp
         }
 
         Delegator delegator = getDelegator(delegatorNameProp, null);
-        List<EntityExpr> expr = new ArrayList<EntityExpr>();
+        List<EntityExpr> expr = new ArrayList<>();
         expr.add(EntityCondition.makeCondition("disabled", EntityOperator.EQUALS, "N"));
         expr.add(EntityCondition.makeCondition("disabled", EntityOperator.EQUALS, null));
 
@@ -165,7 +165,7 @@ public class EntityDataLoadContainer imp
         GenericHelperInfo helperInfo = getHelperInfo(delegator, entityGroup);
         DatabaseUtil dbUtil = new DatabaseUtil(helperInfo);
         Map<String, ModelEntity> modelEntities = getModelEntities(delegator, entityGroup);
-        TreeSet<String> modelEntityNames = new TreeSet<String>(modelEntities.keySet());
+        TreeSet<String> modelEntityNames = new TreeSet<>(modelEntities.keySet());
         Collection<ComponentConfig> allComponents = ComponentConfig.getAllComponents();
 
         // data loading logic starts here
@@ -303,7 +303,7 @@ public class EntityDataLoadContainer imp
     private void dropDbConstraints(DatabaseUtil dbUtil, Map<String, ModelEntity> modelEntities,
             TreeSet<String> modelEntityNames) {
 
-        List<String> messages = new ArrayList<String>();
+        List<String> messages = new ArrayList<>();
 
         Debug.logImportant("Dropping foreign key indices...", module);
         for (String entityName : modelEntityNames) {
@@ -335,7 +335,7 @@ public class EntityDataLoadContainer imp
     private void createDbConstraints(DatabaseUtil dbUtil, Map<String, ModelEntity> modelEntities,
             TreeSet<String> modelEntityNames) {
 
-        List<String> messages = new ArrayList<String>();
+        List<String> messages = new ArrayList<>();
 
         Debug.logImportant("Creating foreign keys...", module);
         for (String entityName : modelEntityNames) {
@@ -367,7 +367,7 @@ public class EntityDataLoadContainer imp
     private void dropPrimaryKeys(DatabaseUtil dbUtil, Map<String, ModelEntity> modelEntities,
             TreeSet<String> modelEntityNames) {
 
-        List<String> messages = new ArrayList<String>();
+        List<String> messages = new ArrayList<>();
 
         Debug.logImportant("Dropping primary keys...", module);
         for (String entityName : modelEntityNames) {
@@ -383,7 +383,7 @@ public class EntityDataLoadContainer imp
     private void createPrimaryKeys(DatabaseUtil dbUtil, Map<String, ModelEntity> modelEntities,
             TreeSet<String> modelEntityNames) {
 
-        List<String> messages = new ArrayList<String>();
+        List<String> messages = new ArrayList<>();
 
         Debug.logImportant("Creating primary keys...", module);
         for (String entityName : modelEntityNames) {
@@ -397,8 +397,8 @@ public class EntityDataLoadContainer imp
     }
 
     private void repairDbColumns(DatabaseUtil dbUtil, Map<String, ModelEntity> modelEntities) {
-        List<String> fieldsToRepair = new ArrayList<String>();
-        List<String> messages = new ArrayList<String>();
+        List<String> fieldsToRepair = new ArrayList<>();
+        List<String> messages = new ArrayList<>();
         dbUtil.checkDb(modelEntities, fieldsToRepair, messages, false, false, false, false);
         if (UtilValidate.isNotEmpty(fieldsToRepair)) {
             dbUtil.repairColumnSizeChanges(modelEntities, fieldsToRepair, messages);
@@ -426,8 +426,8 @@ public class EntityDataLoadContainer imp
         boolean continueOnFail = isPropertySet(loadDataProps, CONTINUE_ON_FAIL);
 
         List<URL> urlList = prepareDataUrls(delegator, baseDelegator, allComponents, helperInfo, loadDataProps);
-        List<String> infoMessages = new ArrayList<String>();
-        List<Object> errorMessages = new ArrayList<Object>();
+        List<String> infoMessages = new ArrayList<>();
+        List<Object> errorMessages = new ArrayList<>();
         int totalRowsChanged = 0;
 
         logDataLoadingPlan(urlList, delegator.getDelegatorName());
@@ -462,7 +462,7 @@ public class EntityDataLoadContainer imp
             Collection<ComponentConfig> allComponents, GenericHelperInfo helperInfo,
             Map<String, String> loadDataProps) throws ContainerException {
 
-        List<URL> urlList = new ArrayList<URL>();
+        List<URL> urlList = new ArrayList<>();
 
         // prepare command line properties passed by user
         List<String> files = getLoadFiles(loadDataProps.get(DATA_FILE));
@@ -500,7 +500,7 @@ public class EntityDataLoadContainer imp
     }
 
     private List<String> getLoadFiles(String fileProp) {
-        List<String> fileList = new ArrayList<String>();
+        List<String> fileList = new ArrayList<>();
         Optional.ofNullable(fileProp)
                 .ifPresent(props -> fileList.addAll(StringUtil.split(props, ",")));
         return fileList;
@@ -519,8 +519,8 @@ public class EntityDataLoadContainer imp
     private List<String> prepareTenantLoadComponents(Delegator delegator, Delegator baseDelegator,
             Collection<ComponentConfig> allComponents, String component) {
 
-        List<String> loadComponents = new ArrayList<String>();
-        List<EntityCondition> queryConditions = new ArrayList<EntityCondition>();
+        List<String> loadComponents = new ArrayList<>();
+        List<EntityCondition> queryConditions = new ArrayList<>();
 
         if (UtilValidate.isNotEmpty(delegator.getDelegatorTenantId()) && EntityUtil.isMultiTenantEnabled()) {
 
@@ -547,7 +547,7 @@ public class EntityDataLoadContainer imp
     }
 
     private List<URL> retireveDataUrlsFromFileList(List<String> files) throws ContainerException {
-        List<URL> fileUrls = new ArrayList<URL>();
+        List<URL> fileUrls = new ArrayList<>();
         for(String file: files) {
             URL url = UtilURL.fromResource(file);
             if (url == null) {

Modified: ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/data/EntityDataServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/data/EntityDataServices.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/data/EntityDataServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/data/EntityDataServices.java Sun Apr 21 12:49:52 2019
@@ -167,7 +167,7 @@ public class EntityDataServices {
     }
 
     private static List<File> getFileList(File root) {
-        List<File> fileList = new LinkedList<File>();
+        List<File> fileList = new LinkedList<>();
 
         // check for a file list file
         File listFile = new File(root, "FILELIST.txt");
@@ -337,7 +337,7 @@ public class EntityDataServices {
         String groupName = (String) context.get("groupName");
         Boolean fixSizes = (Boolean) context.get("fixColSizes");
         if (fixSizes == null) fixSizes = Boolean.FALSE;
-        List<String> messages = new LinkedList<String>();
+        List<String> messages = new LinkedList<>();
 
         GenericHelperInfo helperInfo = delegator.getGroupHelperInfo(groupName);
         DatabaseUtil dbUtil = new DatabaseUtil(helperInfo);
@@ -376,7 +376,7 @@ public class EntityDataServices {
         // step 5 - repair field sizes
         if (fixSizes) {
             Debug.logImportant("Updating column field size changes", module);
-            List<String> fieldsWrongSize = new LinkedList<String>();
+            List<String> fieldsWrongSize = new LinkedList<>();
             dbUtil.checkDb(modelEntities, fieldsWrongSize, messages, true, true, true, true);
             if (fieldsWrongSize.size() > 0) {
                 dbUtil.repairColumnSizeChanges(modelEntities, fieldsWrongSize, messages);

Modified: ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/DelegatorEcaHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/DelegatorEcaHandler.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/DelegatorEcaHandler.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/DelegatorEcaHandler.java Sun Apr 21 12:49:52 2019
@@ -48,7 +48,7 @@ public class DelegatorEcaHandler impleme
     protected Delegator delegator = null;
     protected String delegatorName = null;
     protected String entityEcaReaderName = null;
-    protected AtomicReference<Future<DispatchContext>> dctx = new AtomicReference<Future<DispatchContext>>();
+    protected AtomicReference<Future<DispatchContext>> dctx = new AtomicReference<>();
 
     public DelegatorEcaHandler() { }
 
@@ -60,7 +60,7 @@ public class DelegatorEcaHandler impleme
         Callable<DispatchContext> creator = () -> {
             return EntityServiceFactory.getDispatchContext(DelegatorEcaHandler.this.delegator);
         };
-        FutureTask<DispatchContext> futureTask = new FutureTask<DispatchContext>(creator);
+        FutureTask<DispatchContext> futureTask = new FutureTask<>(creator);
         if (this.dctx.compareAndSet(null, futureTask)) {
             ExecutionPool.GLOBAL_BATCH.submit(futureTask);
         }
@@ -102,7 +102,7 @@ public class DelegatorEcaHandler impleme
         }
 
         if (!rules.isEmpty() && Debug.verboseOn()) Debug.logVerbose("Running ECA (" + event + ").", module);
-        Set<String> actionsRun = new TreeSet<String>();
+        Set<String> actionsRun = new TreeSet<>();
         for (EntityEcaRule eca: rules) {
             eca.eval(currentOperation, this.getDispatchContext(), value, isError, actionsRun);
         }

Modified: ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/EntityEcaCondition.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/EntityEcaCondition.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/EntityEcaCondition.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/EntityEcaCondition.java Sun Apr 21 12:49:52 2019
@@ -109,7 +109,7 @@ public final class EntityEcaCondition im
         if (Debug.verboseOn()) Debug.logVerbose("Comparing : " + lhsValue + " " + operator + " " + rhsValue, module);
 
         // evaluate the condition & invoke the action(s)
-        List<Object> messages = new LinkedList<Object>();
+        List<Object> messages = new LinkedList<>();
         Boolean cond = ObjectType.doRealCompare(lhsValue, rhsValue, operator, compareType, format, messages, null, dctx.getClassLoader(), constant);
 
         // if any messages were returned send them out
@@ -182,7 +182,7 @@ public final class EntityEcaCondition im
     }
     
     protected List<String> getFieldNames() {
-        List<String> fieldNameList = new ArrayList<String>();
+        List<String> fieldNameList = new ArrayList<>();
         if( UtilValidate.isNotEmpty(lhsValueName) ) {
             fieldNameList.add(lhsValueName);
         }

Modified: ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/EntityEcaRule.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/EntityEcaRule.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/EntityEcaRule.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/EntityEcaRule.java Sun Apr 21 12:49:52 2019
@@ -51,7 +51,7 @@ public final class EntityEcaRule impleme
     private final List<EntityEcaCondition> conditions;
     private final List<Object> actionsAndSets;
     private boolean enabled = true;
-    private final List<String> conditionFieldNames  = new ArrayList<String>();
+    private final List<String> conditionFieldNames  = new ArrayList<>();
 
     public EntityEcaRule(Element eca) {
         this.entityName = eca.getAttribute("entity");
@@ -59,8 +59,8 @@ public final class EntityEcaRule impleme
         this.eventName = eca.getAttribute("event");
         this.runOnError = "true".equals(eca.getAttribute("run-on-error"));
         this.enabled = !"false".equals(eca.getAttribute("enabled"));
-        ArrayList<EntityEcaCondition> conditions = new ArrayList<EntityEcaCondition>();
-        ArrayList<Object> actionsAndSets = new ArrayList<Object>();
+        ArrayList<EntityEcaCondition> conditions = new ArrayList<>();
+        ArrayList<Object> actionsAndSets = new ArrayList<>();
         for (Element element: UtilXml.childElementList(eca)) {
             if ("condition".equals(element.getNodeName())) {
                 EntityEcaCondition ecaCond = new EntityEcaCondition(element, true, false);
@@ -130,7 +130,7 @@ public final class EntityEcaRule impleme
             return;
         }
         // Are fields tested in a condition missing? If so, we need to load them
-        List<String> fieldsToLoad = new ArrayList<String>();
+        List<String> fieldsToLoad = new ArrayList<>();
         for( String conditionFieldName : conditionFieldNames) {
             if( value.get(conditionFieldName) == null) {
                 fieldsToLoad.add(conditionFieldName);
@@ -147,7 +147,7 @@ public final class EntityEcaRule impleme
             }
         }
 
-        Map<String, Object> context = new HashMap<String, Object>();
+        Map<String, Object> context = new HashMap<>();
         context.putAll(value);
 
         boolean allCondTrue = true;

Modified: ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/EntityEcaUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/EntityEcaUtil.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/EntityEcaUtil.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/eca/EntityEcaUtil.java Sun Apr 21 12:49:52 2019
@@ -57,7 +57,7 @@ public final class EntityEcaUtil {
         Map<String, Map<String, List<EntityEcaRule>>> ecaCache = entityEcaReaders.get(entityEcaReaderName);
         if (ecaCache == null) {
             // FIXME: Collections are not thread safe
-            ecaCache = new HashMap<String, Map<String, List<EntityEcaRule>>>();
+            ecaCache = new HashMap<>();
             readConfig(entityEcaReaderName, ecaCache);
             ecaCache = entityEcaReaders.putIfAbsentAndGet(entityEcaReaderName, ecaCache);
         }
@@ -90,7 +90,7 @@ public final class EntityEcaUtil {
             return;
         }
 
-        List<Future<List<EntityEcaRule>>> futures = new LinkedList<Future<List<EntityEcaRule>>>();
+        List<Future<List<EntityEcaRule>>> futures = new LinkedList<>();
         for (Resource eecaResourceElement : entityEcaReaderInfo.getResourceList()) {
             ResourceHandler handler = new MainResourceHandler(EntityConfig.ENTITY_ENGINE_XML_FILENAME, eecaResourceElement.getLoader(), eecaResourceElement.getLocation());
             futures.add(ExecutionPool.GLOBAL_FORK_JOIN.submit(createEcaLoaderCallable(handler)));
@@ -110,14 +110,14 @@ public final class EntityEcaUtil {
                 Map<String, List<EntityEcaRule>> eventMap = ecaCache.get(entityName);
                 List<EntityEcaRule> rules = null;
                 if (eventMap == null) {
-                    eventMap = new HashMap<String, List<EntityEcaRule>>();
-                    rules = new LinkedList<EntityEcaRule>();
+                    eventMap = new HashMap<>();
+                    rules = new LinkedList<>();
                     ecaCache.put(entityName, eventMap);
                     eventMap.put(eventName, rules);
                 } else {
                     rules = eventMap.get(eventName);
                     if (rules == null) {
-                        rules = new LinkedList<EntityEcaRule>();
+                        rules = new LinkedList<>();
                         eventMap.put(eventName, rules);
                     }
                 }
@@ -132,7 +132,7 @@ public final class EntityEcaUtil {
     }
 
     private static List<EntityEcaRule> getEcaDefinitions(ResourceHandler handler) {
-        List<EntityEcaRule> rules = new LinkedList<EntityEcaRule>();
+        List<EntityEcaRule> rules = new LinkedList<>();
         Element rootElement = null;
         try {
             rootElement = handler.getDocument().getDocumentElement();

Modified: ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/permission/EntityPermissionChecker.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/permission/EntityPermissionChecker.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/permission/EntityPermissionChecker.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/permission/EntityPermissionChecker.java Sun Apr 21 12:49:52 2019
@@ -95,7 +95,7 @@ public class EntityPermissionChecker {
         if (UtilValidate.isNotEmpty(targetOperationString)) {
             List<String> operationsFromString = StringUtil.split(targetOperationString, "|");
             if (targetOperationList == null) {
-                targetOperationList = new ArrayList<String>();
+                targetOperationList = new ArrayList<>();
             }
             targetOperationList.addAll(operationsFromString);
         }
@@ -111,7 +111,7 @@ public class EntityPermissionChecker {
         if (UtilValidate.isNotEmpty(idString)) {
             entityIdList = StringUtil.split(idString, "|");
         } else {
-            entityIdList = new LinkedList<String>();
+            entityIdList = new LinkedList<>();
         }
         String entityName = entityNameExdr.expandString(context);
         HttpServletRequest request = (HttpServletRequest)context.get("request");
@@ -178,13 +178,13 @@ public class EntityPermissionChecker {
                                   Security security, String entityAction,
                                   String privilegeEnumId, String quickCheckContentId) {
 
-        List<Object> entityIds = new LinkedList<Object>();
+        List<Object> entityIds = new LinkedList<>();
         if (content != null) entityIds.add(content);
         if (UtilValidate.isNotEmpty(quickCheckContentId)) {
             List<String> quickList = StringUtil.split(quickCheckContentId, "|");
             if (UtilValidate.isNotEmpty(quickList)) entityIds.addAll(quickList);
         }
-        Map<String, Object> results  = new HashMap<String, Object>();
+        Map<String, Object> results  = new HashMap<>();
         boolean passed = false;
         if (userLogin != null && entityAction != null) {
             passed = security.hasEntityPermission("CONTENTMGR", entityAction, userLogin);
@@ -270,7 +270,7 @@ public class EntityPermissionChecker {
                                                                   .where(EntityCondition.makeCondition(lcEntityName + "OperationId", EntityOperator.IN, targetOperationList))
                                                                   .cache(true)
                                                                   .queryList();
-        Map<String, GenericValue> entities = new HashMap<String, GenericValue>();
+        Map<String, GenericValue> entities = new HashMap<>();
         String pkFieldName = modelEntity.getFirstPkFieldName();
 
         //TODO: privilegeEnumId test
@@ -321,8 +321,8 @@ public class EntityPermissionChecker {
         // Note that "quickCheck" id come first in the list
         // Check with no roles or purposes on the chance that the permission fields contain _NA_ s.
         
-        Map<String, List<String>> purposes = new HashMap<String, List<String>>();
-        Map<String, List<String>> roles = new HashMap<String, List<String>>();
+        Map<String, List<String>> purposes = new HashMap<>();
+        Map<String, List<String>> roles = new HashMap<>();
         //List purposeList = null;
         //List roleList = null;
         for (Object id: entityIdList) {
@@ -421,7 +421,7 @@ public class EntityPermissionChecker {
                 if (entity == null) continue;
 
                 String entityId = entity.getString(pkFieldName);
-                List<String> ownedContentIdList = new LinkedList<String>();
+                List<String> ownedContentIdList = new LinkedList<>();
                 getEntityOwners(delegator, entity, ownedContentIdList, "Content", "ownerContentId");
 
                 List<String> ownedContentRoleIds = getUserRolesFromList(delegator, ownedContentIdList, partyId, "contentId", "partyId", "roleTypeId", "ContentRole");
@@ -520,7 +520,7 @@ public class EntityPermissionChecker {
         // Check with no roles or purposes on the chance that the permission fields contain _NA_ s.
         String pkFieldName = modelEntity.getFirstPkFieldName();
         
-        Map<String, GenericValue> entities = new HashMap<String, GenericValue>();
+        Map<String, GenericValue> entities = new HashMap<>();
         //List purposeList = null;
         //List roleList = null;
         for (Object id: entityIdList) {
@@ -619,7 +619,7 @@ public class EntityPermissionChecker {
 
         boolean hasRoleOperation = false;
         boolean hasNeed = false;
-        List<String> newHasRoleList = new LinkedList<String>();
+        List<String> newHasRoleList = new LinkedList<>();
         for (String roleOp: targetOperations) {
             int idx1 = roleOp.indexOf("HAS_");
             if (idx1 == 0) {
@@ -757,9 +757,9 @@ public class EntityPermissionChecker {
 
         List<String> purposeIds = null;
         if (passedPurposes == null) {
-            purposeIds = new LinkedList<String>();
+            purposeIds = new LinkedList<>();
         } else {
-            purposeIds = new LinkedList<String>();
+            purposeIds = new LinkedList<>();
             purposeIds.addAll(passedPurposes);
         }
 
@@ -791,7 +791,7 @@ public class EntityPermissionChecker {
      */
     public static List<String> getUserRoles(GenericValue entity, GenericValue userLogin, Delegator delegator) throws GenericEntityException {
 
-        List<String> roles = new LinkedList<String>();
+        List<String> roles = new LinkedList<>();
         if (entity == null) return roles;
         String entityName = entity.getEntityName();
             // TODO: Need to use ContentManagementWorker.getAuthorContent first
@@ -828,7 +828,7 @@ public class EntityPermissionChecker {
                         party = contentRole.getRelatedOne("Party", false);
                         partyTypeId = (String)party.get("partyTypeId");
                         if (partyTypeId != null && partyTypeId.equals("PARTY_GROUP")) {
-                           Map<String, Object> map = new HashMap<String, Object>();
+                           Map<String, Object> map = new HashMap<>();
 
                            // At some point from/thru date will need to be added
                            map.put("partyIdFrom", partyId);
@@ -1021,7 +1021,7 @@ public class EntityPermissionChecker {
         }
 
         public void clearList() {
-            this.entityList = new LinkedList<GenericValue>();
+            this.entityList = new LinkedList<>();
         }
 
         public void init(Delegator delegator) throws GenericEntityException {
@@ -1121,7 +1121,7 @@ public class EntityPermissionChecker {
 
     public static class StdAuxiliaryValueGetter implements AuxiliaryValueGetter {
 
-        protected List<String> entityList = new LinkedList<String>();
+        protected List<String> entityList = new LinkedList<>();
         protected String auxiliaryFieldName;
         protected String entityName;
         protected String entityIdName;
@@ -1152,7 +1152,7 @@ public class EntityPermissionChecker {
         }
 
         public void clearList() {
-            this.entityList = new LinkedList<String>();
+            this.entityList = new LinkedList<>();
         }
 
         public void setList(List<String> lst) {
@@ -1162,7 +1162,7 @@ public class EntityPermissionChecker {
         public void init(Delegator delegator, String entityId) throws GenericEntityException {
 
             if (this.entityList == null) {
-               this.entityList = new LinkedList<String>();
+               this.entityList = new LinkedList<>();
             }
             if (UtilValidate.isEmpty(this.entityName)) {
                 return;
@@ -1198,7 +1198,7 @@ public class EntityPermissionChecker {
 
     public static class StdRelatedRoleGetter implements RelatedRoleGetter {
 
-        protected List<String> roleIdList = new LinkedList<String>();
+        protected List<String> roleIdList = new LinkedList<>();
         protected String roleTypeFieldName;
         protected String partyFieldName;
         protected String entityName;
@@ -1241,7 +1241,7 @@ public class EntityPermissionChecker {
         }
 
         public void clearList() {
-            this.roleIdList = new LinkedList<String>();
+            this.roleIdList = new LinkedList<>();
         }
 
         public void setList(List<String> lst) {
@@ -1260,7 +1260,7 @@ public class EntityPermissionChecker {
 
         public void initWithAncestors(Delegator delegator, GenericValue entity, String partyId) throws GenericEntityException {
 
-           List<String> ownedContentIdList = new LinkedList<String>();
+           List<String> ownedContentIdList = new LinkedList<>();
            getEntityOwners(delegator, entity, ownedContentIdList, this.entityName, this.ownerEntityFieldName);
            if (ownedContentIdList.size() > 0) {
                List<String> lst = getUserRolesFromList(delegator, ownedContentIdList, partyId, this.roleEntityIdName, this.partyFieldName, this.roleTypeFieldName, this.roleEntityName);
@@ -1321,7 +1321,7 @@ public class EntityPermissionChecker {
                                                  .cache(true)
                                                  .queryList();
         List<GenericValue> roleListFiltered = EntityUtil.filterByDate(roleList);
-        Set<String> distinctSet = new HashSet<String>();
+        Set<String> distinctSet = new HashSet<>();
         for (GenericValue contentRole: roleListFiltered) {
             String roleTypeId = contentRole.getString(roleTypeIdFieldName);
             distinctSet.add(roleTypeId);

Modified: ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/synchronization/EntitySyncContext.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/synchronization/EntitySyncContext.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/synchronization/EntitySyncContext.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/synchronization/EntitySyncContext.java Sun Apr 21 12:49:52 2019
@@ -106,8 +106,8 @@ public class EntitySyncContext {
     //results for a given time block, we will do a query to find the next create/update/remove
     //time for that entity, and also keep track of a global next with the lowest future next value;
     //using these we can skip a lot of queries and speed this up significantly
-    public Map<String, Timestamp> nextEntityCreateTxTime = new HashMap<String, Timestamp>();
-    public Map<String, Timestamp> nextEntityUpdateTxTime = new HashMap<String, Timestamp>();
+    public Map<String, Timestamp> nextEntityCreateTxTime = new HashMap<>();
+    public Map<String, Timestamp> nextEntityUpdateTxTime = new HashMap<>();
     public Timestamp nextCreateTxTime = null;
     public Timestamp nextUpdateTxTime = null;
     public Timestamp nextRemoveTxTime = null;
@@ -320,7 +320,7 @@ public class EntitySyncContext {
 
     public ArrayList<GenericValue> assembleValuesToCreate() throws SyncDataErrorException {
         // first grab all values inserted in the date range, then get the updates (leaving out all values inserted in the data range)
-        ArrayList<GenericValue> valuesToCreate = new ArrayList<GenericValue>(); // make it an ArrayList to easily merge in sorted lists
+        ArrayList<GenericValue> valuesToCreate = new ArrayList<>(); // make it an ArrayList to easily merge in sorted lists
 
         if (this.nextCreateTxTime != null && (this.nextCreateTxTime.equals(currentRunEndTime) || this.nextCreateTxTime.after(currentRunEndTime))) {
             // this means that for all entities in this pack we found on the last pass that there would be nothing for this one, so just return nothing...
@@ -474,7 +474,7 @@ public class EntitySyncContext {
 
     public ArrayList<GenericValue> assembleValuesToStore() throws SyncDataErrorException {
         // simulate two ordered lists and merge them on-the-fly for faster combined sorting
-        ArrayList<GenericValue> valuesToStore = new ArrayList<GenericValue>(); // make it an ArrayList to easily merge in sorted lists
+        ArrayList<GenericValue> valuesToStore = new ArrayList<>(); // make it an ArrayList to easily merge in sorted lists
 
         if (this.nextUpdateTxTime != null && (this.nextUpdateTxTime.equals(currentRunEndTime) || this.nextUpdateTxTime.after(currentRunEndTime))) {
             // this means that for all entities in this pack we found on the last pass that there would be nothing for this one, so just return nothing...
@@ -626,7 +626,7 @@ public class EntitySyncContext {
 
     public LinkedList<GenericEntity> assembleKeysToRemove() throws SyncDataErrorException {
         // get all removed items from the given time range, add to list for those
-        LinkedList<GenericEntity> keysToRemove = new LinkedList<GenericEntity>();
+        LinkedList<GenericEntity> keysToRemove = new LinkedList<>();
 
         if (this.nextRemoveTxTime != null && (this.nextRemoveTxTime.equals(currentRunEndTime) || this.nextRemoveTxTime.after(currentRunEndTime))) {
             // this means that for all entities in this pack we found on the last pass that there would be nothing for this one, so just return nothing...
@@ -871,7 +871,7 @@ public class EntitySyncContext {
     }
 
     public Set<String> makeEntityNameToUseSet() {
-        Set<String> entityNameToUseSet = new HashSet<String>();
+        Set<String> entityNameToUseSet = new HashSet<>();
         for (ModelEntity modelEntity: this.entityModelToUseList) {
             entityNameToUseSet.add(modelEntity.getEntityName());
         }
@@ -1182,7 +1182,7 @@ public class EntitySyncContext {
         @Override
         public void saveSyncErrorInfo(EntitySyncContext esc) {
             if (esc != null) {
-                List<Object> errorList = new LinkedList<Object>();
+                List<Object> errorList = new LinkedList<>();
                 esc.saveSyncErrorInfo("ESR_OTHER_ERROR", errorList);
                 this.addErrorMessages(errorList);
             }
@@ -1200,7 +1200,7 @@ public class EntitySyncContext {
         @Override
         public void saveSyncErrorInfo(EntitySyncContext esc) {
             if (esc != null) {
-                List<Object> errorList = new LinkedList<Object>();
+                List<Object> errorList = new LinkedList<>();
                 esc.saveSyncErrorInfo("ESR_DATA_ERROR", errorList);
                 this.addErrorMessages(errorList);
             }
@@ -1218,7 +1218,7 @@ public class EntitySyncContext {
         @Override
         public void saveSyncErrorInfo(EntitySyncContext esc) {
             if (esc != null) {
-                List<Object> errorList = new LinkedList<Object>();
+                List<Object> errorList = new LinkedList<>();
                 esc.saveSyncErrorInfo("ESR_SERVICE_ERROR", errorList);
                 this.addErrorMessages(errorList);
             }

Modified: ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/synchronization/EntitySyncServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/synchronization/EntitySyncServices.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/synchronization/EntitySyncServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entityext/src/main/java/org/apache/ofbiz/entityext/synchronization/EntitySyncServices.java Sun Apr 21 12:49:52 2019
@@ -290,7 +290,7 @@ public class EntitySyncServices {
             gotMoreData = false;
 
             // call pullAndReportEntitySyncData, initially with no results, then with results from last loop
-            Map<String, Object> remoteCallContext = new HashMap<String, Object>();
+            Map<String, Object> remoteCallContext = new HashMap<>();
             remoteCallContext.put("entitySyncId", entitySyncId);
             remoteCallContext.put("delegatorName", context.get("remoteDelegatorName"));
             remoteCallContext.put("userLogin", context.get("userLogin"));

Modified: ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/MiniLangUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/MiniLangUtil.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/MiniLangUtil.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/MiniLangUtil.java Sun Apr 21 12:49:52 2019
@@ -61,7 +61,7 @@ public final class MiniLangUtil {
     private static final Set<String> SCRIPT_PREFIXES;
 
     static {
-        Set<String> scriptPrefixes = new HashSet<String>();
+        Set<String> scriptPrefixes = new HashSet<>();
         for (String scriptName : ScriptUtil.SCRIPT_NAMES) {
             scriptPrefixes.add(scriptName.concat(":"));
         }

Modified: ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/MiniLangValidate.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/MiniLangValidate.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/MiniLangValidate.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/MiniLangValidate.java Sun Apr 21 12:49:52 2019
@@ -44,7 +44,7 @@ public final class MiniLangValidate {
      * @throws ValidationException If an invalid attribute name is found and <code>validation.level=strict</code>
      */
     public static void attributeNames(SimpleMethod method, Element element, String... validAttributeNames) throws ValidationException {
-        Set<String> validNames = new HashSet<String>();
+        Set<String> validNames = new HashSet<>();
         for (String name : validAttributeNames) {
             validNames.add(name);
         }
@@ -78,7 +78,7 @@ public final class MiniLangValidate {
      * @throws ValidationException If an invalid child element is found and <code>validation.level=strict</code>
      */
     public static void childElements(SimpleMethod method, Element element, String... validChildElementNames) throws ValidationException {
-        Set<String> validNames = new HashSet<String>();
+        Set<String> validNames = new HashSet<>();
         for (String name : validChildElementNames) {
             validNames.add(name);
         }
@@ -245,7 +245,7 @@ public final class MiniLangValidate {
      * @throws ValidationException If none of the required child elements are found and <code>validation.level=strict</code>
      */
     public static void requireAnyChildElement(SimpleMethod method, Element element, String... elementNames) throws ValidationException {
-        Set<String> childElementNames = new HashSet<String>();
+        Set<String> childElementNames = new HashSet<>();
         Node node = element.getFirstChild();
         while (node != null) {
             if (node.getNodeType() == Node.ELEMENT_NODE) {
@@ -293,7 +293,7 @@ public final class MiniLangValidate {
      * @throws ValidationException If any of the required child elements are not found and <code>validation.level=strict</code>
      */
     public static void requiredChildElements(SimpleMethod method, Element element, String... elementNames) throws ValidationException {
-        Set<String> childElementNames = new HashSet<String>();
+        Set<String> childElementNames = new HashSet<>();
         Node node = element.getFirstChild();
         while (node != null) {
             if (node.getNodeType() == Node.ELEMENT_NODE) {

Modified: ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/SimpleMapProcessor.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/SimpleMapProcessor.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/SimpleMapProcessor.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/SimpleMapProcessor.java Sun Apr 21 12:49:52 2019
@@ -41,7 +41,7 @@ public class SimpleMapProcessor {
     private static final UtilCache<URL, Map<String, MapProcessor>> simpleMapProcessorsURLCache = UtilCache.createUtilCache("minilang.SimpleMapProcessorsURL", 0, 0);
 
     protected static Map<String, MapProcessor> getAllProcessors(URL xmlURL) throws MiniLangException {
-        Map<String, MapProcessor> mapProcessors = new HashMap<String, MapProcessor>();
+        Map<String, MapProcessor> mapProcessors = new HashMap<>();
         // read in the file
         Document document = null;
         try {

Modified: ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/SimpleMethod.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/SimpleMethod.java?rev=1857906&r1=1857905&r2=1857906&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/SimpleMethod.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/minilang/src/main/java/org/apache/ofbiz/minilang/SimpleMethod.java Sun Apr 21 12:49:52 2019
@@ -88,7 +88,7 @@ public final class SimpleMethod extends
     private static final UtilCache<String, SimpleMethod> simpleMethodsResourceCache = UtilCache.createUtilCache("minilang.SimpleMethodsResource", 0, 0);
 
     static {
-        Map<String, MethodOperation.Factory<MethodOperation>> mapFactories = new HashMap<String, MethodOperation.Factory<MethodOperation>>();
+        Map<String, MethodOperation.Factory<MethodOperation>> mapFactories = new HashMap<>();
         Iterator<MethodOperation.Factory<MethodOperation>> it = UtilGenerics.cast(ServiceLoader.load(MethodOperation.Factory.class, SimpleMethod.class.getClassLoader()).iterator());
         while (it.hasNext()) {
             MethodOperation.Factory<MethodOperation> factory = it.next();
@@ -123,7 +123,7 @@ public final class SimpleMethod extends
         if (UtilValidate.isEmpty(fromLocation)) {
             fromLocation = "<location not known>";
         }
-        Map<String, SimpleMethod> simpleMethods = new HashMap<String, SimpleMethod>();
+        Map<String, SimpleMethod> simpleMethods = new HashMap<>();
         Document document = null;
         try {
             document = UtilXml.readXmlDocument(content, true, true);
@@ -135,7 +135,7 @@ public final class SimpleMethod extends
     }
 
     private static Map<String, SimpleMethod> getAllSimpleMethods(URL xmlURL) throws MiniLangException {
-        Map<String, SimpleMethod> simpleMethods = new LinkedHashMap<String, SimpleMethod>();
+        Map<String, SimpleMethod> simpleMethods = new LinkedHashMap<>();
         Document document = null;
         try {
             document = UtilXml.readXmlDocument(xmlURL, true, true);
@@ -220,13 +220,13 @@ public final class SimpleMethod extends
      */
     public static List<SimpleMethod> getSimpleMethodsList(String xmlResource, ClassLoader loader) throws MiniLangException {
         Map<String, SimpleMethod> simpleMethodMap = getSimpleMethods(xmlResource, loader);
-        return new ArrayList<SimpleMethod>(simpleMethodMap.values());
+        return new ArrayList<>(simpleMethodMap.values());
     }
 
     public static List<MethodOperation> readOperations(Element simpleMethodElement, SimpleMethod simpleMethod) throws MiniLangException {
         Assert.notNull("simpleMethodElement", simpleMethodElement, "simpleMethod", simpleMethod);
         List<? extends Element> operationElements = UtilXml.childElementList(simpleMethodElement);
-        ArrayList<MethodOperation> methodOperations = new ArrayList<MethodOperation>(operationElements.size());
+        ArrayList<MethodOperation> methodOperations = new ArrayList<>(operationElements.size());
         if (UtilValidate.isNotEmpty(operationElements)) {
             for (Element curOperElem : operationElements) {
                 String nodeName = UtilXml.getNodeNameIgnorePrefix(curOperElem);
@@ -391,7 +391,7 @@ public final class SimpleMethod extends
     private void addMessage(MethodContext methodContext, String messageListName, String message) {
         List<String> messages = methodContext.getEnv(messageListName);
         if (messages == null) {
-            messages = new LinkedList<String>();
+            messages = new LinkedList<>();
             methodContext.putEnv(messageListName, messages);
         }
         messages.add(message);