You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2018/12/11 13:33:51 UTC

svn commit: r1848673 [3/4] - in /ofbiz: ofbiz-framework/trunk/ ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/invoice/ ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thir...

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/test/EntityTestSuite.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/test/EntityTestSuite.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/test/EntityTestSuite.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/test/EntityTestSuite.java Tue Dec 11 13:33:49 2018
@@ -139,8 +139,6 @@ public class EntityTestSuite extends Ent
         testValue.addObserver(observer);
         testValue.put("description", "New Testing Type #Update-1");
         assertEquals("Observer called with original GenericValue field name", "description", observer.arg);
-        observer.observable = null;
-        observer.arg = null;
         GenericValue clonedValue = (GenericValue) testValue.clone();
         clonedValue.put("description", "New Testing Type #Update-1");
         assertTrue("Cloned Observable has changed", clonedValue.hasChanged());
@@ -1249,7 +1247,7 @@ public class EntityTestSuite extends Ent
         try {
             transactionStarted = TransactionUtil.begin();
             for (int i = 1; i <= numberOfQueries; i++) {
-                List rows = EntityQuery.use(delegator).from("SequenceValueItem").queryList();
+                List<GenericValue> rows = EntityQuery.use(delegator).from("SequenceValueItem").queryList();
                 totalNumberOfRows = totalNumberOfRows + rows.size();
             }
             TransactionUtil.commit(transactionStarted);
@@ -1270,7 +1268,7 @@ public class EntityTestSuite extends Ent
         try {
             for (int i = 1; i <= numberOfQueries; i++) {
                 transactionStarted = TransactionUtil.begin();
-                List rows = EntityQuery.use(delegator).from("SequenceValueItem").queryList();
+                List<GenericValue> rows = EntityQuery.use(delegator).from("SequenceValueItem").queryList();
                 totalNumberOfRows = totalNumberOfRows + rows.size();
                 TransactionUtil.commit(transactionStarted);
             }
@@ -1288,12 +1286,10 @@ public class EntityTestSuite extends Ent
     }
 
     private final class TestObserver implements Observer {
-        private Observable observable;
         private Object arg;
 
         @Override
         public void update(Observable observable, Object arg) {
-            this.observable = observable;
             this.arg = arg;
         }
     }

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java Tue Dec 11 13:33:49 2018
@@ -47,7 +47,6 @@ import javax.transaction.xa.Xid;
 import org.apache.commons.collections4.map.ListOrderedMap;
 import org.apache.ofbiz.base.util.Debug;
 import org.apache.ofbiz.base.util.UtilDateTime;
-import org.apache.ofbiz.base.util.UtilGenerics;
 import org.apache.ofbiz.base.util.UtilValidate;
 import org.apache.ofbiz.entity.GenericEntityConfException;
 import org.apache.ofbiz.entity.GenericEntityException;
@@ -780,10 +779,6 @@ public final class TransactionUtil imple
         public void logError(String message) {
             Debug.logError(this.getCauseThrowable(), (message == null ? "" : message) + this.getCauseMessage(), module);
         }
-
-        public boolean isEmpty() {
-            return (UtilValidate.isEmpty(this.getCauseMessage()) && this.getCauseThrowable() == null);
-        }
     }
 
     private static void pushSetRollbackOnlyCauseSave(RollbackOnlyCause e) {
@@ -841,12 +836,8 @@ public final class TransactionUtil imple
     /**
      * Maintain the suspended transactions together with their timestamps
      */
-    private static ThreadLocal<Map<Transaction, Timestamp>> suspendedTxStartStamps = new ThreadLocal<Map<Transaction, Timestamp>>() {
-        @Override
-        public Map<Transaction, Timestamp> initialValue() {
-            return UtilGenerics.checkMap(new ListOrderedMap<>());
-        }
-    };
+    private static ThreadLocal<ListOrderedMap<Transaction, Timestamp>> suspendedTxStartStamps =
+            ThreadLocal.withInitial(ListOrderedMap::new);
 
     /**
     * Put the stamp to remember later
@@ -891,9 +882,9 @@ public final class TransactionUtil imple
     * Remove the stamp from stack (when resuming)
     */
     private static void popTransactionStartStamp() {
-        ListOrderedMap map = (ListOrderedMap) suspendedTxStartStamps.get();
+        ListOrderedMap<Transaction, Timestamp> map = suspendedTxStartStamps.get();
         if (map.size() > 0) {
-            transactionStartStamp.set((Timestamp) map.remove(map.lastKey()));
+            transactionStartStamp.set(map.remove(map.lastKey()));
         } else {
             Debug.logError("Error in transaction handling - no saved start stamp found - using NOW.", module);
             transactionStartStamp.set(UtilDateTime.nowTimestamp());

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=1848673&r1=1848672&r2=1848673&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 Tue Dec 11 13:33:49 2018
@@ -481,7 +481,8 @@ public class EntityQuery {
         if (whereEntityCondition == null && fieldMap != null) {
             if (this.searchPkOnly) {
                 //Resolve if the map contains a sub map parameters, use a containsKeys to avoid error when a GenericValue is given as map
-                Map<String, Object> parameters = fieldMap.containsKey("parameters") ? (Map<String, Object>) fieldMap.get("parameters") : null;
+                Map<String, Object> parameters =
+                        fieldMap.containsKey("parameters") ? UtilGenerics.cast(fieldMap.get("parameters")) : null;
                 GenericPK pk = GenericPK.create(delegator.getModelEntity(entityName));
                 pk.setPKFields(parameters);
                 pk.setPKFields(fieldMap);

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=1848673&r1=1848672&r2=1848673&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 Tue Dec 11 13:33:49 2018
@@ -380,7 +380,8 @@ public class EntitySaxReader extends Def
                             currentValue.setString(currentFieldName.toString(), new String(currentFieldValue));
                         }
                     } else {
-                        Debug.logWarning("Ignoring invalid field name [" + currentFieldName + "] found for the entity: " + currentValue.getEntityName() + " with value=" + currentFieldValue, module);
+                        Debug.logWarning("Ignoring invalid field name [" + currentFieldName + "] found for the entity: "
+                                + currentValue.getEntityName() + " with value=" + currentFieldValue.toString(), module);
                     }
                     currentFieldValue = 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=1848673&r1=1848672&r2=1848673&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 Tue Dec 11 13:33:49 2018
@@ -323,7 +323,7 @@ public final class EntityUtil {
         //force check entity label before order by
         List<T> localizedValues = new ArrayList<T>();
         for (T value : values) {
-            T newValue = (T) value.clone();
+            T newValue = UtilGenerics.cast(value.clone());
             for (String orderByField : orderBy) {
                 if (orderByField.endsWith(" DESC")) {
                     orderByField= orderByField.substring(0, orderByField.length() - 5);

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=1848673&r1=1848672&r2=1848673&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 Tue Dec 11 13:33:49 2018
@@ -182,6 +182,7 @@ public final class EntityEcaRule impleme
      * @deprecated Not thread-safe, no replacement.
      * @param enabled
      */
+    @Deprecated
     public void setEnabled(boolean enabled) {
         this.enabled = enabled;
     }

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=1848673&r1=1848672&r2=1848673&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 Tue Dec 11 13:33:49 2018
@@ -519,19 +519,6 @@ 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.
         String pkFieldName = modelEntity.getFirstPkFieldName();
-        if (Debug.infoOn()) {
-        String entityIdString = "ENTITIES: ";
-        for (Object obj: entityIdList) {
-            if (obj instanceof GenericValue) {
-                String s = ((GenericValue)obj).getString(pkFieldName);
-                entityIdString += s + "  ";
-            } else {
-                entityIdString += obj + "  ";
-            }
-        }
-            //if (Debug.infoOn()) Debug.logInfo(entityIdString, module);
-        }
-
         
         Map<String, GenericValue> entities = new HashMap<String, GenericValue>();
         //List purposeList = null;

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=1848673&r1=1848672&r2=1848673&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 Tue Dec 11 13:33:49 2018
@@ -172,7 +172,7 @@ public final class MiniLangUtil {
         Converter<Object, Object> converter = (Converter<Object, Object>) Converters.getConverter(sourceClass, targetClass);
         LocalizedConverter<Object, Object> localizedConverter = null;
         if (converter instanceof LocalizedConverter) {
-            localizedConverter = (LocalizedConverter) converter;
+            localizedConverter = (LocalizedConverter<Object, Object>) converter;
             if (locale == null) {
                 locale = Locale.getDefault();
             }

Modified: ofbiz/ofbiz-framework/trunk/framework/security/src/main/java/org/apache/ofbiz/security/SecurityUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/security/src/main/java/org/apache/ofbiz/security/SecurityUtil.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/security/src/main/java/org/apache/ofbiz/security/SecurityUtil.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/security/src/main/java/org/apache/ofbiz/security/SecurityUtil.java Tue Dec 11 13:33:49 2018
@@ -20,7 +20,6 @@ package org.apache.ofbiz.security;
 
 
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
 import org.apache.ofbiz.base.util.Debug;

Modified: ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ExecutionServiceException.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ExecutionServiceException.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ExecutionServiceException.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ExecutionServiceException.java Tue Dec 11 13:33:49 2018
@@ -18,6 +18,7 @@
  *******************************************************************************/
 package org.apache.ofbiz.service;
 
+@SuppressWarnings("serial")
 public class ExecutionServiceException extends org.apache.ofbiz.base.util.GeneralException {
 
     public ExecutionServiceException() {

Modified: ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ModelParam.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ModelParam.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ModelParam.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ModelParam.java Tue Dec 11 13:33:49 2018
@@ -21,6 +21,7 @@ package org.apache.ofbiz.service;
 import java.io.Serializable;
 import java.util.List;
 import java.util.Locale;
+import java.util.Objects;
 
 import javax.wsdl.Definition;
 import javax.wsdl.Part;
@@ -209,6 +210,14 @@ public class ModelParam implements Seria
         return model.name.equals(this.name);
     }
 
+    @Override
+    public int hashCode() {
+        return Objects.hash(allowHtml, defaultValue, description, entityName, fieldName, entityName,
+                fieldName, formDisplay, formLabel, internal, mode, name, optional, overrideFormDisplay,
+                overrideOptional, requestAttributeName, stringListSuffix, stringMapPrefix, type, validators);
+    }
+
+    @Override
     public boolean equals(Object obj) {
         if (!(obj instanceof ModelParam)) {
             return false;

Modified: ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ServiceUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ServiceUtil.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ServiceUtil.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ServiceUtil.java Tue Dec 11 13:33:49 2018
@@ -670,6 +670,7 @@ public final class ServiceUtil {
         return locale;
     }
 
+    @SafeVarargs
     public static <T extends Object> Map<String, Object> makeContext(T... args) {
         if (args == null) {
             throw new IllegalArgumentException("args is null in makeContext, this would throw a NullPointerExcption.");

Modified: ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/calendar/RecurrenceRule.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/calendar/RecurrenceRule.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/calendar/RecurrenceRule.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/calendar/RecurrenceRule.java Tue Dec 11 13:33:49 2018
@@ -322,6 +322,7 @@ public class RecurrenceRule {
      *@param currentCount The total number of times the recurrence has run.
      *@return long The current recurrence as long if valid. If next recurrence is not valid, returns 0.
      */
+    @SuppressWarnings("fallthrough")
     public long validCurrent(long startTime, long checkTime, long currentCount) {
         if (startTime == 0) {
             startTime = RecurrenceUtil.now();
@@ -354,7 +355,6 @@ public class RecurrenceRule {
             if (cal.get(Calendar.YEAR) != checkTimeCal.get(Calendar.YEAR)) {
                 return 0;
             }
-
         case MONTHLY:
             if (MONTHLY == getFrequency()) {
                 cal.add(Calendar.MONTH, -getIntervalInt());
@@ -364,7 +364,6 @@ public class RecurrenceRule {
             } else {
                 cal.set(Calendar.MONTH, checkTimeCal.get(Calendar.MONTH));
             }
-
         case WEEKLY:
             if (WEEKLY == getFrequency()) {
                 cal.add(Calendar.WEEK_OF_YEAR, -getIntervalInt());
@@ -374,7 +373,6 @@ public class RecurrenceRule {
             } else {
                 cal.set(Calendar.WEEK_OF_YEAR, checkTimeCal.get(Calendar.WEEK_OF_YEAR));
             }
-
         case DAILY:
             if (DAILY == getFrequency()) {
                 cal.add(Calendar.DAY_OF_MONTH, -getIntervalInt());
@@ -384,7 +382,6 @@ public class RecurrenceRule {
             } else {
                 cal.set(Calendar.DAY_OF_MONTH, checkTimeCal.get(Calendar.DAY_OF_MONTH));
             }
-
         case HOURLY:
             if (HOURLY == getFrequency()) {
                 cal.add(Calendar.HOUR_OF_DAY, -getIntervalInt());
@@ -394,7 +391,6 @@ public class RecurrenceRule {
             } else {
                 cal.set(Calendar.HOUR_OF_DAY, checkTimeCal.get(Calendar.HOUR_OF_DAY));
             }
-
         case MINUTELY:
             if (MINUTELY == getFrequency()) {
                 cal.add(Calendar.MINUTE, -getIntervalInt());
@@ -404,7 +400,6 @@ public class RecurrenceRule {
             } else {
                 cal.set(Calendar.MINUTE, checkTimeCal.get(Calendar.MINUTE));
             }
-
         case SECONDLY:
             if (SECONDLY == getFrequency()) {
                 cal.add(Calendar.SECOND, -getIntervalInt());

Modified: ofbiz/ofbiz-framework/trunk/framework/testtools/src/main/java/org/apache/ofbiz/testtools/ModelTestSuite.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/testtools/src/main/java/org/apache/ofbiz/testtools/ModelTestSuite.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/testtools/src/main/java/org/apache/ofbiz/testtools/ModelTestSuite.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/testtools/src/main/java/org/apache/ofbiz/testtools/ModelTestSuite.java Tue Dec 11 13:33:49 2018
@@ -119,10 +119,10 @@ public class ModelTestSuite {
             }
         } else if ("groovy-test-suite".equals(nodeName)) {
             try {
-                Class testClass = GroovyUtil.getScriptClassFromLocation(testElement.getAttribute("location"));
-                TestCase groovyTestCase = (GroovyScriptTestCase) testClass.newInstance();
+                Class<? extends TestCase> testClass =
+                        UtilGenerics.cast(GroovyUtil.getScriptClassFromLocation(testElement.getAttribute("location")));
                 this.testList.add(new TestSuite(testClass, testElement.getAttribute("name")));
-            } catch (GeneralException|InstantiationException|IllegalAccessException e) {
+            } catch (GeneralException e) {
                 Debug.logError(e, module);
             }
         } else if ("service-test".equals(nodeName)) {

Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/JWTManager.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/JWTManager.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/JWTManager.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/JWTManager.java Tue Dec 11 13:33:49 2018
@@ -124,7 +124,7 @@ public class JWTManager {
             Claims claims = Jwts.parser().setSigningKey(key).parseClaimsJws(token).getBody();
             //OK, we can trust this JWT
             for (int i = 0; i < types.size(); i++) {
-                result.put(types.get(i), (String) claims.get(types.get(i)));
+                result.put(types.get(i), claims.get(types.get(i)));
             }
             return result;
         } catch (SignatureException e) {

Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/GroovyEventHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/GroovyEventHandler.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/GroovyEventHandler.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/GroovyEventHandler.java Tue Dec 11 13:33:49 2018
@@ -34,6 +34,7 @@ import org.apache.ofbiz.base.util.Debug;
 import org.apache.ofbiz.base.util.GroovyUtil;
 import org.apache.ofbiz.base.util.ScriptHelper;
 import org.apache.ofbiz.base.util.ScriptUtil;
+import org.apache.ofbiz.base.util.UtilGenerics;
 import org.apache.ofbiz.base.util.UtilHttp;
 import org.apache.ofbiz.base.util.UtilMisc;
 import org.apache.ofbiz.base.util.UtilValidate;
@@ -111,7 +112,7 @@ public class GroovyEventHandler implemen
             }
             // check the result
             if (result instanceof Map) {
-                Map resultMap = (Map)result;
+                Map<String, Object> resultMap = UtilGenerics.cast(result);
                 String successMessage = (String)resultMap.get("_event_message_");
                 if (successMessage != null) {
                     request.setAttribute("_EVENT_MESSAGE_", successMessage);

Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/SOAPEventHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/SOAPEventHandler.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/SOAPEventHandler.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/SOAPEventHandler.java Tue Dec 11 13:33:49 2018
@@ -152,8 +152,8 @@ public class SOAPEventHandler implements
 
         // get the service name and parameters
         try {
-            InputStream inputStream = (InputStream) request.getInputStream();
-            SOAPModelBuilder builder = (SOAPModelBuilder) OMXMLBuilderFactory.createSOAPModelBuilder(inputStream, "UTF-8");
+            InputStream inputStream = request.getInputStream();
+            SOAPModelBuilder builder = OMXMLBuilderFactory.createSOAPModelBuilder(inputStream, "UTF-8");
             reqEnv = (SOAPEnvelope) builder.getDocumentElement();
 
             // log the request message

Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/ScriptEventHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/ScriptEventHandler.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/ScriptEventHandler.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/ScriptEventHandler.java Tue Dec 11 13:33:49 2018
@@ -32,6 +32,7 @@ import javax.servlet.http.HttpSession;
 
 import org.apache.ofbiz.base.util.Debug;
 import org.apache.ofbiz.base.util.ScriptUtil;
+import org.apache.ofbiz.base.util.UtilGenerics;
 import org.apache.ofbiz.base.util.UtilHttp;
 import org.apache.ofbiz.base.util.UtilMisc;
 import org.apache.ofbiz.webapp.control.ConfigXMLReader.Event;
@@ -109,7 +110,7 @@ public final class ScriptEventHandler im
                 return "error";
             }
             if (result instanceof Map) {
-                Map resultMap = (Map)result;
+                Map<String, Object> resultMap = UtilGenerics.cast(result);
                 String successMessage = (String)resultMap.get("_event_message_");
                 if (successMessage != null) {
                     request.setAttribute("_EVENT_MESSAGE_", successMessage);

Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/OfbizAmountTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/OfbizAmountTransform.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/OfbizAmountTransform.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/OfbizAmountTransform.java Tue Dec 11 13:33:49 2018
@@ -27,6 +27,7 @@ import javax.servlet.http.HttpServletReq
 
 import org.apache.ofbiz.base.util.Debug;
 import org.apache.ofbiz.base.util.UtilFormatOut;
+import org.apache.ofbiz.base.util.UtilGenerics;
 import org.apache.ofbiz.base.util.UtilHttp;
 
 import freemarker.core.Environment;
@@ -46,7 +47,7 @@ public class OfbizAmountTransform implem
     public static final String module = OfbizAmountTransform.class.getName();
     public static final String SPELLED_OUT_FORMAT = "spelled-out";
 
-    private static String getArg(Map args, String key) {
+    private static String getArg(Map<String, Object> args, String key) {
         String  result = "";
         Object o = args.get(key);
         if (o != null) {
@@ -64,7 +65,7 @@ public class OfbizAmountTransform implem
         }
         return result;
     }
-    private static Double getAmount(Map args, String key) {
+    private static Double getAmount(Map<String, Object> args, String key) {
         if (args.containsKey(key)) {
             Object o = args.get(key);
             if (Debug.verboseOn()) Debug.logVerbose("Amount Object : " + o.getClass().getName(), module);
@@ -90,12 +91,15 @@ public class OfbizAmountTransform implem
         }
         return 0.00;
     }
-    public Writer getWriter(final Writer out, Map args) {
+
+    @Override
+    public Writer getWriter(Writer out, @SuppressWarnings("rawtypes") Map args) {
         final StringBuilder buf = new StringBuilder();
 
-        final Double amount = OfbizAmountTransform.getAmount(args, "amount");
-        final String locale = OfbizAmountTransform.getArg(args, "locale");
-        final String format = OfbizAmountTransform.getArg(args, "format");
+        Map<String, Object> arguments = UtilGenerics.cast(args);
+        final Double amount = OfbizAmountTransform.getAmount(arguments, "amount");
+        final String locale = OfbizAmountTransform.getArg(arguments, "locale");
+        final String format = OfbizAmountTransform.getArg(arguments, "format");
 
         return new Writer(out) {
             @Override

Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/OfbizContentTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/OfbizContentTransform.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/OfbizContentTransform.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/OfbizContentTransform.java Tue Dec 11 13:33:49 2018
@@ -26,6 +26,7 @@ import javax.servlet.http.HttpServletReq
 
 import org.apache.ofbiz.base.util.Debug;
 import org.apache.ofbiz.base.util.UtilCodec;
+import org.apache.ofbiz.base.util.UtilGenerics;
 import org.apache.ofbiz.base.util.UtilValidate;
 import org.apache.ofbiz.webapp.taglib.ContentUrlTag;
 
@@ -42,7 +43,7 @@ public class OfbizContentTransform imple
 
     public final static String module = OfbizContentTransform.class.getName();
 
-    private static String getArg(Map args, String key) {
+    private static String getArg(Map<String, Object> args, String key) {
         String  result = "";
         Object obj = args.get(key);
         if (obj != null) {
@@ -61,9 +62,10 @@ public class OfbizContentTransform imple
         return result;
     }
 
-    public Writer getWriter(final Writer out, Map args) {
+    @Override
+    public Writer getWriter(Writer out, @SuppressWarnings("rawtypes") Map args) {
         final StringBuilder buf = new StringBuilder();
-        final String imgSize = OfbizContentTransform.getArg(args, "variant");
+        final String imgSize = OfbizContentTransform.getArg(UtilGenerics.cast(args), "variant");
         return new Writer(out) {
             @Override
             public void write(char cbuf[], int off, int len) {

Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/OfbizCurrencyTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/OfbizCurrencyTransform.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/OfbizCurrencyTransform.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/OfbizCurrencyTransform.java Tue Dec 11 13:33:49 2018
@@ -28,6 +28,7 @@ import javax.servlet.http.HttpServletReq
 
 import org.apache.ofbiz.base.util.Debug;
 import org.apache.ofbiz.base.util.UtilFormatOut;
+import org.apache.ofbiz.base.util.UtilGenerics;
 import org.apache.ofbiz.base.util.UtilHttp;
 import org.apache.ofbiz.base.util.UtilValidate;
 import org.apache.ofbiz.entity.Delegator;
@@ -49,7 +50,7 @@ public class OfbizCurrencyTransform impl
 
     public static final String module = OfbizCurrencyTransform.class.getName();
 
-    private static String getArg(Map args, String key) {
+    private static String getArg(Map<String, Object> args, String key) {
         String  result = "";
         Object o = args.get(key);
         if (o != null) {
@@ -68,7 +69,7 @@ public class OfbizCurrencyTransform impl
         return result;
     }
 
-    private static BigDecimal getAmount(Map args, String key) {
+    private static BigDecimal getAmount(Map<String, Object> args, String key) {
         if (args.containsKey(key)) {
             Object o = args.get(key);
 
@@ -87,7 +88,7 @@ public class OfbizCurrencyTransform impl
         return BigDecimal.ZERO;
     }
 
-    private static Integer getInteger(Map args, String key) {
+    private static Integer getInteger(Map<String, Object> args, String key) {
         if (args.containsKey(key)) {
             Object o = args.get(key);
             if (Debug.verboseOn()) Debug.logVerbose("Amount Object : " + o.getClass().getName(), module);
@@ -114,17 +115,19 @@ public class OfbizCurrencyTransform impl
         return null;
     }
 
-    public Writer getWriter(final Writer out, Map args) {
+    @Override
+    public Writer getWriter(Writer out, @SuppressWarnings("rawtypes") Map args) {
         final StringBuilder buf = new StringBuilder();
 
-        final BigDecimal amount = OfbizCurrencyTransform.getAmount(args, "amount");
-        final String isoCode = OfbizCurrencyTransform.getArg(args, "isoCode");
-        final String locale = OfbizCurrencyTransform.getArg(args, "locale");
+        Map<String, Object> arguments = UtilGenerics.cast(args);
+        final BigDecimal amount = OfbizCurrencyTransform.getAmount(arguments, "amount");
+        final String isoCode = OfbizCurrencyTransform.getArg(arguments, "isoCode");
+        final String locale = OfbizCurrencyTransform.getArg(arguments, "locale");
 
         // check the rounding -- DEFAULT is 10 to not round for display, only use this when necessary
         // rounding should be handled by the code, however some times the numbers are coming from
         // someplace else (i.e. an integration)
-        Integer roundingNumber = getInteger(args, "rounding");
+        Integer roundingNumber = getInteger(arguments, "rounding");
         String scaleEnabled = "N";
         Environment env = Environment.getCurrentEnvironment();
         BeanModel req = null;

Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/RenderWrappedTextTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/RenderWrappedTextTransform.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/RenderWrappedTextTransform.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/RenderWrappedTextTransform.java Tue Dec 11 13:33:49 2018
@@ -38,7 +38,8 @@ public class RenderWrappedTextTransform
 
     public static final String module = RenderWrappedTextTransform.class.getName();
 
-    public Writer getWriter(final Writer out, Map args) {
+    @Override
+    public Writer getWriter(final Writer out, @SuppressWarnings("rawtypes") Map args) {
         final Environment env = Environment.getCurrentEnvironment();
         Map<String, Object> ctx = checkMap(FreeMarkerWorker.getWrappedObject("context", env), String.class, Object.class);
         final String wrappedFTL = FreeMarkerWorker.getArg(checkMap(args, String.class, Object.class), "wrappedFTL", ctx);

Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/SetContextFieldTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/SetContextFieldTransform.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/SetContextFieldTransform.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/SetContextFieldTransform.java Tue Dec 11 13:33:49 2018
@@ -21,6 +21,8 @@ package org.apache.ofbiz.webapp.ftl;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.ofbiz.base.util.UtilGenerics;
+
 import freemarker.core.Environment;
 import freemarker.ext.beans.BeanModel;
 import freemarker.template.SimpleScalar;
@@ -36,11 +38,8 @@ public class SetContextFieldTransform im
 
     public static final String module = SetContextFieldTransform.class.getName();
 
-    /*
-     * @see freemarker.template.TemplateMethodModel#exec(java.util.List)
-     */
-    @SuppressWarnings("unchecked")
-    public Object exec(List args) throws TemplateModelException {
+    @Override
+    public Object exec(@SuppressWarnings("rawtypes") List args) throws TemplateModelException {
         if (args == null || args.size() != 2)
             throw new TemplateModelException("Invalid number of arguements");
         if (!(args.get(0) instanceof TemplateScalarModel))
@@ -50,7 +49,7 @@ public class SetContextFieldTransform im
 
         Environment env = Environment.getCurrentEnvironment();
         BeanModel req = (BeanModel)env.getVariable("context");
-        Map context = (Map) req.getWrappedObject();
+        Map<String, Object> context = UtilGenerics.cast(req.getWrappedObject());
 
         String name = ((TemplateScalarModel) args.get(0)).getAsString();
         Object value = null;

Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/SetRequestAttributeMethod.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/SetRequestAttributeMethod.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/SetRequestAttributeMethod.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/ftl/SetRequestAttributeMethod.java Tue Dec 11 13:33:49 2018
@@ -37,10 +37,8 @@ public class SetRequestAttributeMethod i
 
     public static final String module = SetRequestAttributeMethod.class.getName();
 
-    /*
-     * @see freemarker.template.TemplateMethodModel#exec(java.util.List)
-     */
-    public Object exec(List args) throws TemplateModelException {
+    @Override
+    public Object exec(@SuppressWarnings("rawtypes") List args) throws TemplateModelException {
         if (args == null || args.size() != 2)
             throw new TemplateModelException("Invalid number of arguements");
         if (!(args.get(0) instanceof TemplateScalarModel))

Modified: ofbiz/ofbiz-framework/trunk/framework/webtools/src/main/java/org/apache/ofbiz/webtools/GenericWebEvent.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webtools/src/main/java/org/apache/ofbiz/webtools/GenericWebEvent.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/webtools/src/main/java/org/apache/ofbiz/webtools/GenericWebEvent.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/webtools/src/main/java/org/apache/ofbiz/webtools/GenericWebEvent.java Tue Dec 11 13:33:49 2018
@@ -229,7 +229,7 @@ public class GenericWebEvent {
             ModelField field = fieldIter.next();
 
             for (String curValidate : field.getValidators()) {
-                Class<?>[] paramTypes = new Class[] {String.class};
+                Class<?>[] paramTypes = { String.class };
                 Object[] params = new Object[] {findByEntity.get(field.getName()).toString()};
 
                 String className = "org.apache.ofbiz.base.util.UtilValidate";

Modified: ofbiz/ofbiz-framework/trunk/framework/webtools/src/main/java/org/apache/ofbiz/webtools/print/FoPrintServerEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webtools/src/main/java/org/apache/ofbiz/webtools/print/FoPrintServerEvents.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/webtools/src/main/java/org/apache/ofbiz/webtools/print/FoPrintServerEvents.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/webtools/src/main/java/org/apache/ofbiz/webtools/print/FoPrintServerEvents.java Tue Dec 11 13:33:49 2018
@@ -34,7 +34,6 @@ import org.apache.ofbiz.base.util.UtilHt
 import org.apache.ofbiz.base.util.UtilValidate;
 import org.apache.ofbiz.entity.GenericEntityException;
 import org.apache.ofbiz.entity.GenericValue;
-import org.apache.ofbiz.entity.util.EntityUtilProperties;
 import org.apache.ofbiz.service.DispatchContext;
 import org.apache.ofbiz.service.LocalDispatcher;
 import org.apache.ofbiz.widget.renderer.ScreenRenderer;

Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/WidgetWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/WidgetWorker.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/WidgetWorker.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/WidgetWorker.java Tue Dec 11 13:33:49 2018
@@ -98,25 +98,7 @@ public final class WidgetWorker {
             }
 
             for (Map.Entry<String, String> parameter: parameterMap.entrySet()) {
-                String parameterValue = null;
-                if (parameter.getValue() instanceof String) {
-                    parameterValue = parameter.getValue();
-                } else {
-                    Object parameterObject = parameter.getValue();
-
-                    // skip null values
-                    if (parameterObject == null) continue;
-
-                    if (parameterObject instanceof String[]) {
-                        // it's probably a String[], just get the first value
-                        String[] parameterArray = (String[]) parameterObject;
-                        parameterValue = parameterArray[0];
-                        Debug.logInfo("Found String array value for parameter [" + parameter.getKey() + "], using first value: " + parameterValue, module);
-                    } else {
-                        // not a String, and not a String[], just use toString
-                        parameterValue = parameterObject.toString();
-                    }
-                }
+                String parameterValue = parameter.getValue();
 
                 if (needsAmp) {
                     externalWriter.append("&amp;");

Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/AbstractModelCondition.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/AbstractModelCondition.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/AbstractModelCondition.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/AbstractModelCondition.java Tue Dec 11 13:33:49 2018
@@ -689,7 +689,7 @@ public abstract class AbstractModelCondi
             if (fieldString == null) {
                 fieldString = "";
             }
-            Class<?>[] paramTypes = new Class[] { String.class };
+            Class<?>[] paramTypes = { String.class };
             Object[] params = new Object[] { fieldString };
             Class<?> valClass;
             try {

Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelScreenWidget.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelScreenWidget.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelScreenWidget.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelScreenWidget.java Tue Dec 11 13:33:49 2018
@@ -853,17 +853,16 @@ public abstract class ModelScreenWidget
         }
 
         @Override
-        @SuppressWarnings("unchecked")
         public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) throws GeneralException, IOException {
             // isolate the scope
             if (!(context instanceof MapStack)) {
                 context = MapStack.create(context);
             }
 
-            MapStack contextMs = (MapStack) context;
+            MapStack<String> contextMs = UtilGenerics.cast(context);
 
             // create a standAloneStack, basically a "save point" for this SectionsRenderer, and make a new "screens" object just for it so it is isolated and doesn't follow the stack down
-            MapStack standAloneStack = contextMs.standAloneChildStack();
+            MapStack<String> standAloneStack = contextMs.standAloneChildStack();
             standAloneStack.put("screens", new ScreenRenderer(writer, standAloneStack, screenStringRenderer));
             SectionsRenderer sections = new SectionsRenderer(this.sectionMap, standAloneStack, writer, screenStringRenderer);
 

Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTheme.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTheme.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTheme.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelTheme.java Tue Dec 11 13:33:49 2018
@@ -138,6 +138,7 @@ public class ModelTheme implements Seria
                     for (Element visualTheme : UtilXml.childElementList(childElement)) {
                         initVisualThemes.put(visualTheme.getAttribute("id"), new VisualTheme(this, visualTheme));
                     }
+                    break;
                 case "theme-properties":
                     for (Element property : UtilXml.childElementList(childElement)) {
                         addThemeProperty(initThemePropertiesMap, property);
@@ -466,9 +467,6 @@ public class ModelTheme implements Seria
             this.treeRendererLocation = exist && currentModelTemplate.treeRendererLocation != null ? currentModelTemplate.treeRendererLocation : originModelTemplate.treeRendererLocation;
             this.menuRendererLocation = exist && currentModelTemplate.menuRendererLocation != null ? currentModelTemplate.menuRendererLocation : originModelTemplate.menuRendererLocation;
         }
-        public String getName() {
-            return name;
-        }
         public String getEncoder() {
             return encoder;
         }

Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelWidgetCondition.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelWidgetCondition.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelWidgetCondition.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelWidgetCondition.java Tue Dec 11 13:33:49 2018
@@ -552,7 +552,7 @@ public abstract class ModelWidgetConditi
             if (fieldString == null) {
                 fieldString = "";
             }
-            Class<?>[] paramTypes = new Class[] { String.class };
+            Class<?>[] paramTypes = { String.class };
             Object[] params = new Object[] { fieldString };
             Class<?> valClass;
             try {

Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java Tue Dec 11 13:33:49 2018
@@ -51,7 +51,6 @@ import org.apache.ofbiz.widget.model.Fie
 import org.apache.ofbiz.widget.model.ModelForm;
 import org.apache.ofbiz.widget.model.ModelForm.FieldGroup;
 import org.apache.ofbiz.widget.model.ModelForm.FieldGroupBase;
-import org.apache.ofbiz.widget.model.ModelFormField.DisplayField;
 import org.apache.ofbiz.widget.model.ModelFormField;
 import org.apache.ofbiz.widget.model.ModelGrid;
 
@@ -1216,8 +1215,7 @@ public class FormRenderer {
         }
         int itemIndex = -1;
         if (iter instanceof EntityListIterator) {
-            EntityListIterator eli = (EntityListIterator) iter;
-            try {
+            try (EntityListIterator eli = (EntityListIterator) iter) {
                 if(eli.getResultsSizeAfterPartialList() > 0){
                     itemIndex++;
                 }

Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/fo/ScreenFopViewHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/fo/ScreenFopViewHandler.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/fo/ScreenFopViewHandler.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/fo/ScreenFopViewHandler.java Tue Dec 11 13:33:49 2018
@@ -40,10 +40,7 @@ import org.apache.ofbiz.base.util.Debug;
 import org.apache.ofbiz.base.util.GeneralException;
 import org.apache.ofbiz.base.util.UtilCodec;
 import org.apache.ofbiz.base.util.UtilHttp;
-import org.apache.ofbiz.base.util.UtilProperties;
 import org.apache.ofbiz.base.util.UtilValidate;
-import org.apache.ofbiz.entity.Delegator;
-import org.apache.ofbiz.entity.util.EntityUtilProperties;
 import org.apache.ofbiz.webapp.view.AbstractViewHandler;
 import org.apache.ofbiz.webapp.view.ApacheFopWorker;
 import org.apache.ofbiz.webapp.view.ViewHandlerException;
@@ -79,10 +76,9 @@ public class ScreenFopViewHandler extend
     /**
      * @see org.apache.ofbiz.webapp.view.ViewHandler#render(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
      */
+    @SuppressWarnings("unchecked")
     @Override
     public void render(String name, String page, String info, String contentType, String encoding, HttpServletRequest request, HttpServletResponse response) throws ViewHandlerException {
-
-        Delegator delegator = (Delegator) request.getAttribute("delegator");
         VisualTheme visualTheme = UtilHttp.getVisualTheme(request);
         ModelTheme modelTheme = visualTheme.getModelTheme();
 
@@ -189,7 +185,6 @@ public class ScreenFopViewHandler extend
     protected void renderError(String msg, Exception e, String screenOutString, HttpServletRequest request, HttpServletResponse response) throws ViewHandlerException {
         Debug.logError(msg + ": " + e + "; Screen XSL:FO text was:\n" + screenOutString, module);
         try {
-            Delegator delegator = (Delegator) request.getAttribute("delegator");
             Writer writer = new StringWriter();
             VisualTheme visualTheme = UtilHttp.getVisualTheme(request);
             ModelTheme modelTheme = visualTheme.getModelTheme();

Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroScreenViewHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroScreenViewHandler.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroScreenViewHandler.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroScreenViewHandler.java Tue Dec 11 13:33:49 2018
@@ -33,7 +33,6 @@ import org.apache.ofbiz.base.util.UtilCo
 import org.apache.ofbiz.base.util.UtilHttp;
 import org.apache.ofbiz.base.util.UtilValidate;
 import org.apache.ofbiz.base.util.collections.MapStack;
-import org.apache.ofbiz.entity.Delegator;
 import org.apache.ofbiz.webapp.view.AbstractViewHandler;
 import org.apache.ofbiz.webapp.view.ViewHandlerException;
 import org.apache.ofbiz.widget.model.ModelTheme;
@@ -88,7 +87,6 @@ public class MacroScreenViewHandler exte
             Writer writer = response.getWriter();
             VisualTheme visualTheme = UtilHttp.getVisualTheme(request);
             ModelTheme modelTheme = visualTheme.getModelTheme();
-            Delegator delegator = (Delegator) request.getAttribute("delegator");
             // compress output if configured to do so
             if (UtilValidate.isEmpty(encoding)) {
                 encoding = modelTheme.getEncoding(getName());

Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/test/WidgetMacroLibraryTests.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/test/WidgetMacroLibraryTests.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/test/WidgetMacroLibraryTests.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/test/WidgetMacroLibraryTests.java Tue Dec 11 13:33:49 2018
@@ -120,7 +120,7 @@ public class WidgetMacroLibraryTests ext
         HttpClient http = initHttpClient();
         http.setUrl(screentextUrl.concat(authentificationQuery));
         //FIXME need to check if the stream is an application-pdf that don't contains ftl stack trace
-        InputStream screenInputStream = (InputStream) http.postStream();
+        InputStream screenInputStream = http.postStream();
         assertNotNull("Response failed from ofbiz", screenInputStream);
         assertEquals("Response contentType isn't good : " + http.getResponseContentType(), "application/pdf;charset=UTF-8", http.getResponseContentType());
 

Modified: ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/BirtWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/BirtWorker.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/BirtWorker.java (original)
+++ ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/BirtWorker.java Tue Dec 11 13:33:49 2018
@@ -22,7 +22,6 @@ import java.io.File;
 import java.io.OutputStream;
 import java.sql.SQLException;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 import java.util.logging.Level;
@@ -219,7 +218,6 @@ public final class BirtWorker {
             throw new GenericServiceException("Service and entity name cannot be both empty");
         }
 
-        String modelType = null;
         String modelElementName = null;
         String workflowType = null;
         if (UtilValidate.isEmpty(serviceName)) {
@@ -230,8 +228,6 @@ public final class BirtWorker {
             workflowType = "Service";
         }
 
-        //resolve the path location to store the RptDesign file, check if the file already exists under this name and increment index name if needed
-        List<GenericValue> listRptDesigns = null;
         EntityCondition entityConditionRpt = EntityCondition.makeCondition("contentTypeId", "RPTDESIGN");
         String templatePathLocation = BirtUtil.resolveTemplatePathLocation();
         File templatePathLocationDir = new File(templatePathLocation);

Modified: ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/container/BirtContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/container/BirtContainer.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/container/BirtContainer.java (original)
+++ ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/container/BirtContainer.java Tue Dec 11 13:33:49 2018
@@ -28,7 +28,6 @@ import org.eclipse.birt.report.engine.ap
 import org.eclipse.birt.report.engine.api.IReportEngine;
 import org.eclipse.birt.report.engine.api.IReportEngineFactory;
 import org.apache.ofbiz.base.container.Container;
-import org.apache.ofbiz.base.container.ContainerConfig;
 import org.apache.ofbiz.base.container.ContainerException;
 import org.apache.ofbiz.base.start.StartupCommand;
 import org.apache.ofbiz.base.util.Debug;

Modified: ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/email/BirtEmailServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/email/BirtEmailServices.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/email/BirtEmailServices.java (original)
+++ ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/email/BirtEmailServices.java Tue Dec 11 13:33:49 2018
@@ -44,7 +44,6 @@ import org.apache.ofbiz.birt.BirtFactory
 import org.apache.ofbiz.birt.BirtWorker;
 import org.apache.ofbiz.common.email.NotificationServices;
 import org.apache.ofbiz.entity.Delegator;
-import org.apache.ofbiz.entity.util.EntityUtilProperties;
 import org.apache.ofbiz.security.Security;
 import org.apache.ofbiz.service.DispatchContext;
 import org.apache.ofbiz.service.LocalDispatcher;

Modified: ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtMasterReportServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtMasterReportServices.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtMasterReportServices.java (original)
+++ ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtMasterReportServices.java Tue Dec 11 13:33:49 2018
@@ -87,7 +87,7 @@ public class BirtMasterReportServices {
     }
 
     public static Map<String, Object> workEffortPerPerson(DispatchContext dctx, Map<String, Object> context) {
-        Delegator delegator = (Delegator) dctx.getDelegator();
+        Delegator delegator = dctx.getDelegator();
         IReportContext reportContext = (IReportContext) context.get("reportContext");
         Map<String, Object> parameters = UtilGenerics.checkMap(reportContext.getParameterValue("parameters"));
         List<GenericValue> listWorkEffortTime = null;
@@ -208,7 +208,7 @@ public class BirtMasterReportServices {
     }
 
     public static Map<String, Object> turnOver(DispatchContext dctx, Map<String, Object> context) {
-        Delegator delegator = (Delegator) dctx.getDelegator();
+        Delegator delegator = dctx.getDelegator();
         Locale locale = (Locale) context.get("locale");
         IReportContext reportContext = (IReportContext) context.get("reportContext");
         Map<String, Object> parameters = UtilGenerics.checkMap(reportContext.getParameterValue("parameters"));

Modified: ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtServices.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtServices.java (original)
+++ ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtServices.java Tue Dec 11 13:33:49 2018
@@ -76,7 +76,6 @@ import org.eclipse.birt.report.model.api
 import org.eclipse.birt.report.model.api.SlotHandle;
 import org.eclipse.birt.report.model.api.VariableElementHandle;
 import org.eclipse.birt.report.model.api.activity.SemanticException;
-import org.eclipse.birt.report.model.elements.SimpleMasterPage;
 import org.w3c.dom.Document;
 import org.xml.sax.SAXException;
 
@@ -422,7 +421,7 @@ public class BirtServices {
             if (customMethod == null) {
                 return ServiceUtil.returnError("CustomMethod not exist : " + customMethodId); //TODO labelise
             }
-            String customMethodName = (String) customMethod.getString("customMethodName");
+            String customMethodName = customMethod.getString("customMethodName");
             if ("default".equalsIgnoreCase(serviceName)) {
                 serviceName = customMethodName + "PrepareFields";
             }
@@ -757,7 +756,7 @@ public class BirtServices {
         Iterator<DesignElementHandle> iterCube = cubesFromUser.iterator();
 
         while (iterCube.hasNext()) {
-            DesignElementHandle item = (DesignElementHandle) iterCube.next();
+            DesignElementHandle item = iterCube.next();
             DesignElementHandle copy = item.copy().getHandle(item.getModule());
             try {
                 designStored.getCubes().add(copy);
@@ -773,7 +772,7 @@ public class BirtServices {
         Iterator<DesignElementHandle> iter = bodyFromUser.iterator();
 
         while (iter.hasNext()) {
-            DesignElementHandle item = (DesignElementHandle) iter.next();
+            DesignElementHandle item = iter.next();
             DesignElementHandle copy = item.copy().getHandle(item.getModule());
             try {
                 designStored.getBody().add(copy);
@@ -798,7 +797,8 @@ public class BirtServices {
             List<DesignElementHandle> listMasterPages = designFromUser.getMasterPages().getContents();
             for (DesignElementHandle masterPage : listMasterPages) {
                 if (masterPage instanceof SimpleMasterPageHandle) {
-                    designStored.getMasterPages().add((SimpleMasterPage) ((SimpleMasterPageHandle) masterPage).copy()); // TODO check what to use in place of add (deprecated)
+                    SimpleMasterPageHandle masterPageHandle = (SimpleMasterPageHandle) masterPage;
+                    designStored.getMasterPages().add(masterPageHandle.copy().getHandle(masterPage.getModule()));
                 }
             }
         } catch (Exception e) {
@@ -826,7 +826,7 @@ public class BirtServices {
         @SuppressWarnings("unchecked")
         Iterator<DesignElementHandle> iterStored = stylesStored.iterator();
         while (iterStored.hasNext()) {
-            DesignElementHandle item = (DesignElementHandle) iterStored.next();
+            DesignElementHandle item = iterStored.next();
             listStyleNames.add(item.getName());
         }
 
@@ -835,7 +835,7 @@ public class BirtServices {
 
         // adding to styles those which are not already present
         while (iterUser.hasNext()) {
-            DesignElementHandle item = (DesignElementHandle) iterUser.next();
+            DesignElementHandle item = iterUser.next();
             if (!listStyleNames.contains(item.getName())) {
                 DesignElementHandle copy = item.copy().getHandle(item.getModule());
                 try {

Modified: ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtUtil.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtUtil.java (original)
+++ ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/BirtUtil.java Tue Dec 11 13:33:49 2018
@@ -34,7 +34,6 @@ import org.apache.ofbiz.entity.condition
 import org.apache.ofbiz.entity.condition.EntityConditionList;
 import org.apache.ofbiz.entity.condition.EntityExpr;
 import org.apache.ofbiz.entity.util.EntityQuery;
-import org.eclipse.birt.report.engine.api.HTMLServerImageHandler;
 import org.eclipse.birt.report.engine.api.RenderOption;
 import org.eclipse.birt.report.model.api.elements.DesignChoiceConstants;
 
@@ -42,7 +41,6 @@ public final class BirtUtil {
 
     public final static String module = BirtUtil.class.getName();
 
-    private final static HTMLServerImageHandler imageHandler = new HTMLServerImageHandler(); // TODO not used yet or to remove
     private final static Map<String, String> entityFieldTypeBirtTypeMap = MapUtils.unmodifiableMap(UtilMisc.toMap(
             "id", DesignChoiceConstants.COLUMN_DATA_TYPE_STRING,
             "url", DesignChoiceConstants.COLUMN_DATA_TYPE_STRING,

Modified: ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/ReportDesignGenerator.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/ReportDesignGenerator.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/ReportDesignGenerator.java (original)
+++ ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/flexible/ReportDesignGenerator.java Tue Dec 11 13:33:49 2018
@@ -20,7 +20,6 @@
 package org.apache.ofbiz.birt.flexible;
 
 import java.io.IOException;
-import java.util.LinkedHashMap;
 import java.util.Locale;
 import java.util.Map;
 
@@ -87,10 +86,10 @@ public class ReportDesignGenerator {
     public ReportDesignGenerator(Map<String, Object> context, DispatchContext dctx) throws GeneralException, SemanticException {
         locale = (Locale) context.get("locale");
         dataMap = UtilGenerics.checkMap(context.get("dataMap"));
-        filterMap = (LinkedHashMap<String, String>) context.get("filterMap");
+        filterMap = UtilGenerics.cast(context.get("filterMap"));
         serviceName = (String) context.get("serviceName");
         fieldDisplayLabels = UtilGenerics.checkMap(context.get("fieldDisplayLabels"));
-        filterDisplayLabels = (LinkedHashMap<String, String>) context.get("filterDisplayLabels");
+        filterDisplayLabels = UtilGenerics.cast(context.get("filterDisplayLabels"));
         rptDesignName = (String) context.get("rptDesignName");
         String writeFilters = (String) context.get("writeFilters");
         if (UtilValidate.isEmpty(dataMap)) {
@@ -156,7 +155,7 @@ public class ReportDesignGenerator {
                 } else {
                     displayFilterName = filter;
                 }
-                ScalarParameterHandle scalParam = ((ElementFactory) factory).newScalarParameter(filter);
+                ScalarParameterHandle scalParam = factory.newScalarParameter(filter);
                 // scalParam.setDisplayName(displayFilterName); // TODO has no incidence at all right now, is only displayed when using birt's report parameter system. Not our case. I leave it here if any idea arise of how to translate these.
                 scalParam.setPromptText(displayFilterName);
                 if ("javaObject".equals(birtType)) { //Fields of type='blob' are rejected by Birt: org.eclipse.birt.report.model.api.metadata.PropertyValueException: The choice value "javaObject" is not allowed. 

Modified: ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/webapp/view/BirtViewHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/webapp/view/BirtViewHandler.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/webapp/view/BirtViewHandler.java (original)
+++ ofbiz/ofbiz-plugins/trunk/birt/src/main/java/org/apache/ofbiz/birt/webapp/view/BirtViewHandler.java Tue Dec 11 13:33:49 2018
@@ -81,10 +81,10 @@ public class BirtViewHandler implements
 
             // add dynamic parameter for page
             if (UtilValidate.isEmpty(page) || "ExecuteFlexibleReport".equals(page)) {
-                page = (String) request.getParameter("rptDesignFile");
+                page = request.getParameter("rptDesignFile");
             }
             if (UtilValidate.isEmpty(page)) {
-                Locale locale = (Locale) request.getLocale();
+                Locale locale = request.getLocale();
                 throw new ViewHandlerException(UtilProperties.getMessage(resource_error, "BirtErrorNotPublishedReport", locale));
             }
             if (page.startsWith("component://")) {
@@ -112,13 +112,13 @@ public class BirtViewHandler implements
             }
             
             // set override content type
-            String overrideContentType = (String) request.getParameter(BirtWorker.getBirtContentType());
+            String overrideContentType = request.getParameter(BirtWorker.getBirtContentType());
             if (UtilValidate.isNotEmpty(overrideContentType)) {
                 contentType = overrideContentType;
             }
             
             // set output file name to get also file extension
-            String outputFileName = (String) request.getParameter(BirtWorker.getBirtOutputFileName());
+            String outputFileName = request.getParameter(BirtWorker.getBirtOutputFileName());
             if (UtilValidate.isNotEmpty(outputFileName)) {
                 outputFileName = BirtUtil.encodeReportName(outputFileName);
                 String format = BirtUtil.getMimeTypeFileExtension(contentType);

Modified: ofbiz/ofbiz-plugins/trunk/cmssite/src/main/java/org/apache/ofbiz/cmssite/multisite/MultiSiteRequestWrapper.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/cmssite/src/main/java/org/apache/ofbiz/cmssite/multisite/MultiSiteRequestWrapper.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/cmssite/src/main/java/org/apache/ofbiz/cmssite/multisite/MultiSiteRequestWrapper.java (original)
+++ ofbiz/ofbiz-plugins/trunk/cmssite/src/main/java/org/apache/ofbiz/cmssite/multisite/MultiSiteRequestWrapper.java Tue Dec 11 13:33:49 2018
@@ -42,7 +42,6 @@ import javax.servlet.http.HttpSession;
 import javax.servlet.http.HttpUpgradeHandler;
 import javax.servlet.http.Part;
 
-import org.apache.ofbiz.base.util.Debug;
 import org.apache.ofbiz.base.util.UtilHttp;
 
 
@@ -83,12 +82,12 @@ public class MultiSiteRequestWrapper imp
     }
 
     @Override
-    public Enumeration getHeaderNames() {
+    public Enumeration<String> getHeaderNames() {
         return request.getHeaderNames();
     }
 
     @Override
-    public Enumeration getHeaders(String arg0) {
+    public Enumeration<String> getHeaders(String arg0) {
         return request.getHeaders(arg0);
     }
 
@@ -201,7 +200,7 @@ public class MultiSiteRequestWrapper imp
     }
 
     @Override
-    public Enumeration getAttributeNames() {
+    public Enumeration<String> getAttributeNames() {
         return request.getAttributeNames();
     }
 
@@ -251,7 +250,7 @@ public class MultiSiteRequestWrapper imp
     }
 
     @Override
-    public Enumeration getLocales() {
+    public Enumeration<Locale> getLocales() {
         return request.getLocales();
     }
 
@@ -261,12 +260,12 @@ public class MultiSiteRequestWrapper imp
     }
 
     @Override
-    public Map getParameterMap() {
+    public Map<String, String[]> getParameterMap() {
         return request.getParameterMap();
     }
 
     @Override
-    public Enumeration getParameterNames() {
+    public Enumeration<String> getParameterNames() {
         return request.getParameterNames();
     }
 
@@ -406,7 +405,7 @@ public class MultiSiteRequestWrapper imp
     }
 
     @Override
-    public HttpUpgradeHandler upgrade (Class handlerClass) throws IOException, ServletException {
+    public <T extends HttpUpgradeHandler> T upgrade (Class<T> handlerClass) throws IOException, ServletException {
         return request.upgrade(handlerClass);
     }
 }
\ No newline at end of file

Modified: ofbiz/ofbiz-plugins/trunk/cmssite/src/main/java/org/apache/ofbiz/cmssite/multisite/WebSiteFilter.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/cmssite/src/main/java/org/apache/ofbiz/cmssite/multisite/WebSiteFilter.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/cmssite/src/main/java/org/apache/ofbiz/cmssite/multisite/WebSiteFilter.java (original)
+++ ofbiz/ofbiz-plugins/trunk/cmssite/src/main/java/org/apache/ofbiz/cmssite/multisite/WebSiteFilter.java Tue Dec 11 13:33:49 2018
@@ -24,7 +24,6 @@ import java.util.Locale;
 import javax.servlet.Filter;
 import javax.servlet.FilterChain;
 import javax.servlet.FilterConfig;
-import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
@@ -37,7 +36,6 @@ import org.apache.ofbiz.base.util.UtilHt
 import org.apache.ofbiz.base.util.UtilMisc;
 import org.apache.ofbiz.base.util.UtilValidate;
 import org.apache.ofbiz.entity.Delegator;
-import org.apache.ofbiz.entity.DelegatorFactory;
 import org.apache.ofbiz.entity.GenericEntityException;
 import org.apache.ofbiz.entity.GenericValue;
 import org.apache.ofbiz.entity.util.EntityQuery;

Modified: ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java (original)
+++ ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/EbayOrderServices.java Tue Dec 11 13:33:49 2018
@@ -1140,7 +1140,7 @@ public class EbayOrderServices {
                 // If matching party not found then try to find partyId from PartyAttribute entity.
                 GenericValue partyAttribute = null;
                 if (UtilValidate.isNotEmpty(context.get("eiasTokenBuyer"))) {
-                    partyAttribute = EntityQuery.use(delegator).from("PartyAttribute").where("attrValue", (String) context.get("eiasTokenBuyer")).queryFirst();
+                    partyAttribute = EntityQuery.use(delegator).from("PartyAttribute").where("attrValue", context.get("eiasTokenBuyer")).queryFirst();
                     if (UtilValidate.isNotEmpty(partyAttribute)) {
                         partyId = (String) partyAttribute.get("partyId");
                     }

Modified: ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ImportOrdersFromEbay.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ImportOrdersFromEbay.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ImportOrdersFromEbay.java (original)
+++ ofbiz/ofbiz-plugins/trunk/ebay/src/main/java/org/apache/ofbiz/ebay/ImportOrdersFromEbay.java Tue Dec 11 13:33:49 2018
@@ -727,7 +727,7 @@ public class ImportOrdersFromEbay {
                 String contactMechId = "";
                 GenericValue partyAttribute = null;
                 if (UtilValidate.isNotEmpty(parameters.get("eiasTokenBuyer"))) {
-                    partyAttribute = EntityQuery.use(delegator).from("PartyAttribute").where("attrValue", (String)parameters.get("eiasTokenBuyer")).queryFirst();
+                    partyAttribute = EntityQuery.use(delegator).from("PartyAttribute").where("attrValue", parameters.get("eiasTokenBuyer")).queryFirst();
                 }
 
                 // if we get a party, check its contact information.

Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/janrain/JanrainHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/janrain/JanrainHelper.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/janrain/JanrainHelper.java (original)
+++ ofbiz/ofbiz-plugins/trunk/ecommerce/src/main/java/org/apache/ofbiz/ecommerce/janrain/JanrainHelper.java Tue Dec 11 13:33:49 2018
@@ -67,8 +67,8 @@ public class JanrainHelper {
     public JanrainHelper(String apiKey, String baseUrl) {
         while (baseUrl.endsWith("/"))
             baseUrl = baseUrl.substring(0, baseUrl.length() - 1);
-        this.apiKey = apiKey;
-        this.baseUrl = baseUrl;
+        JanrainHelper.apiKey = apiKey;
+        JanrainHelper.baseUrl = baseUrl;
     }
     public String getApiKey() { return apiKey; }
     public String getBaseUrl() { return baseUrl; }
@@ -79,7 +79,7 @@ public class JanrainHelper {
     }
     public HashMap<String, List<String>> allMappings() {
         Element rsp = apiCall("all_mappings", null);
-        Element mappings_node = (Element)rsp.getFirstChild();
+        rsp.getFirstChild();
         HashMap<String, List<String>> result = new HashMap<String, List<String>>();
         NodeList mappings = getNodeList("/rsp/mappings/mapping", rsp);
         for (int i = 0; i < mappings.getLength(); i++) {
@@ -193,8 +193,7 @@ public class JanrainHelper {
         String token =  request.getParameter("token");
         String errMsg = "";
         if (UtilValidate.isNotEmpty(token)) {
-            JanrainHelper janrainHelper = new JanrainHelper(apiKey, baseUrl);
-            Element authInfo = janrainHelper.authInfo(token);
+            Element authInfo = JanrainHelper.authInfo(token);
             Element profileElement = UtilXml.firstChildElement(authInfo, "profile");
             Element nameElement = UtilXml.firstChildElement(profileElement, "name");
             

Modified: ofbiz/ofbiz-plugins/trunk/example/src/main/java/org/apache/ofbiz/example/ExamplePrintServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/example/src/main/java/org/apache/ofbiz/example/ExamplePrintServices.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/example/src/main/java/org/apache/ofbiz/example/ExamplePrintServices.java (original)
+++ ofbiz/ofbiz-plugins/trunk/example/src/main/java/org/apache/ofbiz/example/ExamplePrintServices.java Tue Dec 11 13:33:49 2018
@@ -48,7 +48,6 @@ import org.apache.ofbiz.base.util.Debug;
 import org.apache.ofbiz.base.util.GeneralException;
 import org.apache.ofbiz.base.util.UtilMisc;
 import org.apache.ofbiz.base.util.UtilProperties;
-import org.apache.ofbiz.entity.util.EntityUtilProperties;
 import org.apache.ofbiz.service.DispatchContext;
 import org.apache.ofbiz.service.ServiceUtil;
 import org.apache.ofbiz.webapp.view.ApacheFopWorker;

Modified: ofbiz/ofbiz-plugins/trunk/example/src/main/java/org/apache/ofbiz/example/ExampleServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/example/src/main/java/org/apache/ofbiz/example/ExampleServices.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/example/src/main/java/org/apache/ofbiz/example/ExampleServices.java (original)
+++ ofbiz/ofbiz-plugins/trunk/example/src/main/java/org/apache/ofbiz/example/ExampleServices.java Tue Dec 11 13:33:49 2018
@@ -34,7 +34,7 @@ public class ExampleServices {
     public static Map<String, Object> sendExamplePushNotifications(DispatchContext dctx, Map<String, ? extends Object> context) {
         String exampleId = (String) context.get("exampleId");
         String message = (String) context.get("message");
-        Set<Session> clients = (Set<Session>) ExampleWebSockets.getClients();
+        Set<Session> clients = ExampleWebSockets.getClients();
         try {
             synchronized (clients) {
                 for (Session client : clients) {

Modified: ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/commons/AbstractOFBizAuthenticationHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/commons/AbstractOFBizAuthenticationHandler.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/commons/AbstractOFBizAuthenticationHandler.java (original)
+++ ofbiz/ofbiz-plugins/trunk/ldap/src/main/java/org/apache/ofbiz/ldap/commons/AbstractOFBizAuthenticationHandler.java Tue Dec 11 13:33:49 2018
@@ -48,7 +48,6 @@ import org.apache.ofbiz.service.ModelSer
 import org.apache.ofbiz.webapp.stats.VisitHandler;
 import org.w3c.dom.Element;
 import org.apache.ofbiz.service.ServiceUtil;
-import org.apache.ofbiz.base.util.Debug;
 
 
 /**

Modified: ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/ProductDocument.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/ProductDocument.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/ProductDocument.java (original)
+++ ofbiz/ofbiz-plugins/trunk/lucene/src/main/java/org/apache/ofbiz/content/search/ProductDocument.java Tue Dec 11 13:33:49 2018
@@ -180,10 +180,8 @@ public class ProductDocument implements
                 // Index product content
                 String productContentTypes = EntityUtilProperties.getPropertyValue("prodsearch", "index.include.ProductContentTypes", delegator);
                 for (String productContentTypeId: productContentTypes.split(",")) {
-                    int weight = 1;
                     try {
-                        // this is defaulting to a weight of 1 because you specified you wanted to index this type
-                        weight = EntityUtilProperties.getPropertyAsInteger("prodsearch", "index.weight.ProductContent." + productContentTypeId, 1);
+                        EntityUtilProperties.getPropertyAsInteger("prodsearch", "index.weight.ProductContent." + productContentTypeId, 1);
                     } catch (Exception e) {
                         Debug.logWarning("Could not parse weight number: " + e.toString(), module);
                     }

Modified: ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/user/GitHubAuthenticator.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/user/GitHubAuthenticator.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/user/GitHubAuthenticator.java (original)
+++ ofbiz/ofbiz-plugins/trunk/passport/src/main/java/org/apache/ofbiz/passport/user/GitHubAuthenticator.java Tue Dec 11 13:33:49 2018
@@ -154,7 +154,7 @@ public class GitHubAuthenticator impleme
 
         GenericValue userLogin;
         try {
-            userLogin = EntityQuery.use(delegator).from("UserLogin").where("externalAuthId", (String) userMap.get("id")).queryFirst();
+            userLogin = EntityQuery.use(delegator).from("UserLogin").where("externalAuthId", userMap.get("id")).queryFirst();
         } catch (GenericEntityException e) {
             throw new AuthenticatorException(e.getMessage(), e);
         }

Modified: ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/AbstractHtmlReport.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/AbstractHtmlReport.java?rev=1848673&r1=1848672&r2=1848673&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/AbstractHtmlReport.java (original)
+++ ofbiz/ofbiz-plugins/trunk/pricat/src/main/java/org/apache/ofbiz/htmlreport/AbstractHtmlReport.java Tue Dec 11 13:33:49 2018
@@ -19,10 +19,8 @@
 package org.apache.ofbiz.htmlreport;
 
 import java.io.IOException;
-import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import javax.servlet.jsp.JspException;
 
 import org.apache.ofbiz.htmlreport.util.ReportStringUtil;