You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ad...@apache.org on 2015/04/16 15:05:56 UTC

svn commit: r1674064 - in /ofbiz/trunk: applications/accounting/src/org/ofbiz/accounting/util/ applications/content/src/org/ofbiz/content/webapp/ftl/ applications/humanres/src/org/ofbiz/humanres/ applications/order/src/org/ofbiz/order/shoppingcart/ fra...

Author: adrianc
Date: Thu Apr 16 13:05:55 2015
New Revision: 1674064

URL: http://svn.apache.org/r1674064
Log:
Fix warnings in trunk in Java source code - https://issues.apache.org/jira/browse/OFBIZ-6217.

Modified:
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/OfbizContentAltUrlTransforms.java
    ofbiz/trunk/applications/humanres/src/org/ofbiz/humanres/HumanResEvents.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
    ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/test/TestJSONConverters.java
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/OfbizBshBsfEngine.java
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilCodec.java
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/JdbmRecordManager.java
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/JdbmSerializer.java
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/FlexibleMapAccessor.java
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/UelUtil.java
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/EntityListCache.java
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionBuilder.java
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java
    ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/SimpleMethodBsfEngine.java
    ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/Compare.java
    ofbiz/trunk/framework/security/src/org/ofbiz/security/SecurityFactory.java
    ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/EntityAutoEngine.java
    ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Config.java
    ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizAmountTransform.java
    ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizContentTransform.java
    ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizCurrencyTransform.java
    ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/RenderWrappedTextTransform.java
    ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/SetRequestAttributeMethod.java
    ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/MenuWrapTransform.java
    ofbiz/trunk/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/janrain/JanrainHelper.java

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java?rev=1674064&r1=1674063&r2=1674064&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java Thu Apr 16 13:05:55 2015
@@ -30,6 +30,7 @@ import org.ofbiz.entity.Delegator;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.condition.EntityCondition;
+import org.ofbiz.entity.condition.EntityExpr;
 import org.ofbiz.entity.condition.EntityJoinOperator;
 import org.ofbiz.entity.util.EntityQuery;
 
@@ -295,7 +296,7 @@ public class UtilAccounting {
     public static BigDecimal getGlExchangeRateOfPurchaseInvoice(GenericValue paymentApplication) throws GenericEntityException {
         BigDecimal exchangeRate = BigDecimal.ONE;
         Delegator delegator = paymentApplication.getDelegator();
-        List andConditions = UtilMisc.toList(
+        List<EntityExpr> andConditions = UtilMisc.toList(
                 EntityCondition.makeCondition("glAccountTypeId", "ACCOUNTS_PAYABLE"),
                 EntityCondition.makeCondition("debitCreditFlag", "C"),
                 EntityCondition.makeCondition("acctgTransTypeId", "PURCHASE_INVOICE"),
@@ -316,7 +317,7 @@ public class UtilAccounting {
     public static BigDecimal getGlExchangeRateOfOutgoingPayment(GenericValue paymentApplication) throws GenericEntityException {
         BigDecimal exchangeRate = BigDecimal.ONE;
         Delegator delegator = paymentApplication.getDelegator();
-        List andConditions = UtilMisc.toList(
+        List<EntityExpr> andConditions = UtilMisc.toList(
                 EntityCondition.makeCondition("glAccountTypeId", "CURRENT_ASSET"),
                 EntityCondition.makeCondition("debitCreditFlag", "C"),
                 EntityCondition.makeCondition("acctgTransTypeId", "OUTGOING_PAYMENT"),

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/OfbizContentAltUrlTransforms.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/OfbizContentAltUrlTransforms.java?rev=1674064&r1=1674063&r2=1674064&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/OfbizContentAltUrlTransforms.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/webapp/ftl/OfbizContentAltUrlTransforms.java Thu Apr 16 13:05:55 2015
@@ -40,7 +40,6 @@ import freemarker.template.TemplateTrans
 
 public class OfbizContentAltUrlTransforms implements TemplateTransformModel {
     public final static String module = OfbizContentAltUrlTransforms.class.getName();
-    @SuppressWarnings("unchecked")
     public String getStringArg(Map args, String key) {
         Object o = args.get(key);
         if (o instanceof SimpleScalar) {
@@ -56,7 +55,6 @@ public class OfbizContentAltUrlTransform
     }
     
     @Override
-    @SuppressWarnings("unchecked")
     public Writer getWriter(final Writer out, final Map args)
             throws TemplateModelException, IOException {
         final StringBuilder buf = new StringBuilder();

Modified: ofbiz/trunk/applications/humanres/src/org/ofbiz/humanres/HumanResEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/src/org/ofbiz/humanres/HumanResEvents.java?rev=1674064&r1=1674063&r2=1674064&view=diff
==============================================================================
--- ofbiz/trunk/applications/humanres/src/org/ofbiz/humanres/HumanResEvents.java (original)
+++ ofbiz/trunk/applications/humanres/src/org/ofbiz/humanres/HumanResEvents.java Thu Apr 16 13:05:55 2015
@@ -40,7 +40,6 @@ public class HumanResEvents {
     public static final String resourceError = "ProductErrorUiLabels";
     
     // Please note : the structure of map in this function is according to the JSON data map of the jsTree
-    @SuppressWarnings("unchecked")
     public static String getChildHRCategoryTree(HttpServletRequest request, HttpServletResponse response){
         Delegator delegator = (Delegator) request.getAttribute("delegator");
         String partyId = request.getParameter("partyId");
@@ -49,7 +48,7 @@ public class HumanResEvents {
         String hrefString = request.getParameter("hrefString");
         String hrefString2 = request.getParameter("hrefString2");
         
-        List categoryList = new ArrayList();
+        List<Map<String,Object>> categoryList = new ArrayList<Map<String,Object>>();
         List<GenericValue> childOfComs;
         //check employee position
         try {

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=1674064&r1=1674063&r2=1674064&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Thu Apr 16 13:05:55 2015
@@ -2230,9 +2230,9 @@ public class ShoppingCart implements Ite
     int result=0;
     for (int i = 0; i <(shipGroupIndex + 1); i++) {
        CartShipInfo csi = this.getShipInfo(i);
-       Iterator it = csi.shipItemInfo.keySet().iterator();
+       Iterator<ShoppingCartItem> it = csi.shipItemInfo.keySet().iterator();
         while (it.hasNext()) {
-            ShoppingCartItem item2 = (ShoppingCartItem) it.next();
+            ShoppingCartItem item2 = it.next();
             if (item.equals(item2) ) {
                 result = i;
             }

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/test/TestJSONConverters.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/test/TestJSONConverters.java?rev=1674064&r1=1674063&r2=1674064&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/test/TestJSONConverters.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/test/TestJSONConverters.java Thu Apr 16 13:05:55 2015
@@ -32,6 +32,7 @@ import org.ofbiz.base.conversion.Convert
 import org.ofbiz.base.conversion.Converters;
 import org.ofbiz.base.conversion.JSONConverters;
 import org.ofbiz.base.lang.JSON;
+import org.ofbiz.base.util.UtilGenerics;
 
 public class TestJSONConverters  extends TestCase {
     public TestJSONConverters(String name) {
@@ -41,30 +42,30 @@ public class TestJSONConverters  extends
     }
 
     public void testJSONToMap() throws Exception {
-        Converter<JSON, Map> converter = Converters.getConverter(JSON.class, Map.class);
-        Map map, convertedMap;
-        map = new HashMap();
+        Converter<JSON, Map<String,String>> converter = UtilGenerics.cast(Converters.getConverter(JSON.class, Map.class));
+        Map<String,String> map, convertedMap;
+        map = new HashMap<String,String>();
         map.put("field1", "value1");
         JSON json = JSON.from(map);
-        convertedMap = converter.convert(json);
+        convertedMap = UtilGenerics.toMap(converter.convert(json));
         assertEquals("JSON to Map", map, convertedMap);
     }
 
     public void testJSONToList() throws Exception {
-        Converter<JSON, List> converter = Converters.getConverter(JSON.class, List.class);
-        List list, convertedList;
-        list = new ArrayList();
+        Converter<JSON, List<Object>> converter = UtilGenerics.cast(Converters.getConverter(JSON.class, List.class));
+        List<Object> list, convertedList;
+        list = new ArrayList<Object>();
         list.add("field1");
         list.add("field2");
         JSON json = JSON.from(list);
-        convertedList = converter.convert(json);
+        convertedList = UtilGenerics.toList(converter.convert(json));
         assertEquals("JSON to List", list, convertedList);
     }
 
     public void testMapToJSON() throws Exception {
-        Converter<Map, JSON> converter = Converters.getConverter(Map.class, JSON.class);
+        Converter<Map<String,Object>, JSON> converter = UtilGenerics.cast(Converters.getConverter(Map.class, JSON.class));
         JSON json;
-        Map map = new LinkedHashMap();
+        Map<String,Object> map = new LinkedHashMap<String,Object>();
         map.put("field1", "value1");
         map.put("field2", new BigDecimal("3.7"));
         json = converter.convert(map);
@@ -72,9 +73,9 @@ public class TestJSONConverters  extends
     }
 
     public void testListToJSON() throws Exception {
-        Converter<List, JSON> converter = Converters.getConverter(List.class, JSON.class);
+        Converter<List<String>, JSON> converter = UtilGenerics.cast(Converters.getConverter(List.class, JSON.class));
         JSON json;
-        List list = new ArrayList();
+        List<String> list = new ArrayList<String>();
         list.add("field1");
         list.add("field2");
         json = converter.convert(list);

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/OfbizBshBsfEngine.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/OfbizBshBsfEngine.java?rev=1674064&r1=1674063&r2=1674064&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/OfbizBshBsfEngine.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/OfbizBshBsfEngine.java Thu Apr 16 13:05:55 2015
@@ -40,7 +40,6 @@ import org.apache.bsf.BSFDeclaredBean;
 import org.apache.bsf.BSFException;
 import org.apache.bsf.BSFManager;
 import org.apache.bsf.util.BSFEngineImpl;
-
 import org.ofbiz.base.util.cache.UtilCache;
 
 /**
@@ -63,7 +62,7 @@ public class OfbizBshBsfEngine extends B
 
     private static final UtilCache<String, Interpreter.ParsedScript> parsedScripts = UtilCache.createUtilCache("script.BshBsfParsedCache", 0, 0, false);
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings("rawtypes")
     @Override
     public void initialize(BSFManager mgr, String lang, Vector declaredBeans) throws BSFException {
         super.initialize(mgr, lang, declaredBeans);
@@ -137,7 +136,7 @@ public class OfbizBshBsfEngine extends B
      * It executes the funcBody text in an "anonymous" method call with
      * arguments.
      */
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings("rawtypes")
     @Override
     public Object apply(String source, int lineNo, int columnNo, Object funcBody, Vector namesVec, Vector argsVec) throws BSFException {
         if (namesVec.size() != argsVec.size()) throw new BSFException("number of params/names mismatch");

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilCodec.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilCodec.java?rev=1674064&r1=1674063&r2=1674064&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilCodec.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilCodec.java Thu Apr 16 13:05:55 2015
@@ -160,9 +160,9 @@ public class UtilCodec {
             clean = true;
 
             // try each codec and keep track of which ones work
-            Iterator i = codecs.iterator();
+            Iterator<Codec> i = codecs.iterator();
             while (i.hasNext()) {
-                Codec codec = (Codec) i.next();
+                Codec codec = i.next();
                 String old = working;
                 working = codec.decode(working);
                 if (!old.equals(working)) {

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/JdbmRecordManager.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/JdbmRecordManager.java?rev=1674064&r1=1674063&r2=1674064&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/JdbmRecordManager.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/JdbmRecordManager.java Thu Apr 16 13:05:55 2015
@@ -75,7 +75,6 @@ public class JdbmRecordManager implement
         manager.delete(l);
     }
 
-    @SuppressWarnings("unchecked")
     public Object fetch(long l, Serializer s) throws IOException {
         return manager.fetch(l, s);
     }
@@ -92,7 +91,6 @@ public class JdbmRecordManager implement
         return manager.getRootCount();
     }
 
-    @SuppressWarnings("unchecked")
     public long insert(Object o, Serializer s) throws IOException {
         return manager.insert(o, s);
     }
@@ -109,7 +107,6 @@ public class JdbmRecordManager implement
         manager.setRoot(i, l);
     }
 
-    @SuppressWarnings("unchecked")
     public void update(long l, Object o, Serializer s) throws IOException {
         manager.update(l, o, s);
     }

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/JdbmSerializer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/JdbmSerializer.java?rev=1674064&r1=1674063&r2=1674064&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/JdbmSerializer.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/JdbmSerializer.java Thu Apr 16 13:05:55 2015
@@ -31,7 +31,6 @@ import org.ofbiz.base.util.UtilObject;
  * (needed do to the fact that we do dynamic class loading)
  *
  */
-@SuppressWarnings({"serial", "unchecked"})
 public class JdbmSerializer implements Serializer, ISerializationHandler {
 
     public byte[] serialize(Object o) throws IOException {

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/FlexibleMapAccessor.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/FlexibleMapAccessor.java?rev=1674064&r1=1674063&r2=1674064&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/FlexibleMapAccessor.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/collections/FlexibleMapAccessor.java Thu Apr 16 13:05:55 2015
@@ -43,7 +43,6 @@ import org.ofbiz.base.util.string.UelUti
 public final class FlexibleMapAccessor<T> implements Serializable, IsEmpty {
     public static final String module = FlexibleMapAccessor.class.getName();
     private static final UtilCache<String, FlexibleMapAccessor<?>> fmaCache = UtilCache.createUtilCache("flexibleMapAccessor.ExpressionCache");
-    @SuppressWarnings("unchecked")
     private static final FlexibleMapAccessor nullFma = new FlexibleMapAccessor("");
 
     private final boolean isEmpty;
@@ -219,7 +218,6 @@ public final class FlexibleMapAccessor<T
     }
 
     @Override
-    @SuppressWarnings("unchecked")
     public boolean equals(Object obj) {
         if (this == obj) {
             return true;

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/UelUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/UelUtil.java?rev=1674064&r1=1674063&r2=1674064&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/UelUtil.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/UelUtil.java Thu Apr 16 13:05:55 2015
@@ -79,7 +79,6 @@ public class UelUtil {
      * @return Result object
      * @throws <code>javax.el.*</code> exceptions
      */
-    @SuppressWarnings("unchecked")
     public static Object evaluate(Map<String, ? extends Object> context, String expression, Class expectedType) {
         ELContext elContext = new ReadOnlyContext(context);
         ValueExpression ve = exprFactory.createValueExpression(elContext, expression, expectedType);
@@ -93,7 +92,6 @@ public class UelUtil {
      * @param expectedType The expected object Class to set
      * @throws <code>javax.el.*</code> exceptions
      */
-    @SuppressWarnings("unchecked")
     public static void setValue(Map<String, Object> context, String expression, Class expectedType, Object value) {
         if (Debug.verboseOn()) {
             Debug.logVerbose("UelUtil.setValue invoked, expression = " + expression + ", value = " + value, module);

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/EntityListCache.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/EntityListCache.java?rev=1674064&r1=1674063&r2=1674064&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/EntityListCache.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/cache/EntityListCache.java Thu Apr 16 13:05:55 2015
@@ -18,7 +18,6 @@
  *******************************************************************************/
 package org.ofbiz.entity.cache;
 
-import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
@@ -28,16 +27,11 @@ import java.util.concurrent.ConcurrentMa
 import javax.transaction.UserTransaction;
 
 import org.ofbiz.base.util.Debug;
-import org.ofbiz.base.util.cache.UtilCache;
-import org.ofbiz.entity.GenericPK;
 import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.condition.EntityCondition;
 import org.ofbiz.entity.model.ModelEntity;
 import org.ofbiz.entity.util.EntityUtil;
-import org.ofbiz.entity.transaction.GenericTransactionException;
-import org.ofbiz.entity.transaction.TransactionFactoryLoader;
 import org.ofbiz.entity.transaction.TransactionListener;
-import org.ofbiz.entity.transaction.TransactionUtil;
 
 public class EntityListCache extends AbstractEntityConditionCache<Object, List<GenericValue>> implements TransactionListener {
 

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionBuilder.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionBuilder.java?rev=1674064&r1=1674063&r2=1674064&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionBuilder.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/condition/EntityConditionBuilder.java Thu Apr 16 13:05:55 2015
@@ -36,6 +36,7 @@ import org.ofbiz.entity.model.ModelEntit
 public class EntityConditionBuilder extends BuilderSupport {
     public static final String module = EntityConditionBuilder.class.getName();
 
+    @SuppressWarnings("serial")
     private static class ConditionHolder extends EntityCondition {
         protected EntityCondition condition;
 

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java?rev=1674064&r1=1674063&r2=1674064&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java Thu Apr 16 13:05:55 2015
@@ -1190,8 +1190,8 @@ public class EntityTestSuite extends Ent
         final AtomicBoolean nullSeqIdReturned = new AtomicBoolean(false);
 
         List<Future<Void>> futures = new ArrayList<Future<Void>>();
-        Callable getSeqIdTask = new Callable() {
-                    public Callable<Void> call() throws Exception {
+        Callable<Void> getSeqIdTask = new Callable<Void>() {
+                    public Void call() throws Exception {
                         Long seqId = sequencer.getNextSeqId(sequenceName, 1, null);
                         if (seqId == null) {
                             nullSeqIdReturned.set(true);
@@ -1204,15 +1204,15 @@ public class EntityTestSuite extends Ent
                         return null;
                     }
                 };
-        Callable refreshTask = new Callable() {
-                            public Callable<Void> call() throws Exception {
+        Callable<Void> refreshTask = new Callable<Void>() {
+                            public Void call() throws Exception {
                                 sequencer.forceBankRefresh(sequenceName, 1);
                                 return null;
                             }
                         };
         double probabilityOfRefresh = 0.1;
         for (int i = 1; i <= 1000; i++) {
-            Callable randomTask = Math.random() < probabilityOfRefresh ? refreshTask : getSeqIdTask;
+            Callable<Void> randomTask = Math.random() < probabilityOfRefresh ? refreshTask : getSeqIdTask;
             futures.add(ExecutionPool.GLOBAL_FORK_JOIN.submit(randomTask));
         }
         long startTime = System.currentTimeMillis();

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/SimpleMethodBsfEngine.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/SimpleMethodBsfEngine.java?rev=1674064&r1=1674063&r2=1674064&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/SimpleMethodBsfEngine.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/SimpleMethodBsfEngine.java Thu Apr 16 13:05:55 2015
@@ -47,7 +47,7 @@ public class SimpleMethodBsfEngine exten
     /**
      * This is an implementation of the apply() method. It executes the funcBody text in an "anonymous" method call with arguments.
      */
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings("rawtypes")
     @Override
     public Object apply(String source, int lineNo, int columnNo, Object funcBody, Vector namesVec, Vector argsVec) throws BSFException {
         // if (namesVec.size() != argsVec.size()) throw new BSFException("number of params/names mismatch");
@@ -100,7 +100,7 @@ public class SimpleMethodBsfEngine exten
         eval(source, lineNo, columnNo, script);
     }
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings("rawtypes")
     @Override
     public void initialize(BSFManager mgr, String lang, Vector declaredBeans) throws BSFException {
         super.initialize(mgr, lang, declaredBeans);

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/Compare.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/Compare.java?rev=1674064&r1=1674063&r2=1674064&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/Compare.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/conditional/Compare.java Thu Apr 16 13:05:55 2015
@@ -29,6 +29,7 @@ import java.util.TimeZone;
 
 import org.ofbiz.base.util.Assert;
 import org.ofbiz.base.util.ObjectType;
+import org.ofbiz.base.util.UtilGenerics;
 import org.ofbiz.entity.GenericEntity;
 import org.ofbiz.minilang.MiniLangUtil;
 
@@ -109,7 +110,7 @@ public abstract class Compare {
                 return false;
             }
             try {
-                Collection collection = (Collection) lValue;
+                Collection<Object> collection = UtilGenerics.checkCollection(lValue);
                 return collection.contains(rValue);
             } catch (ClassCastException e) {
             }
@@ -122,7 +123,6 @@ public abstract class Compare {
 
     private static final class CompareEquals extends Compare {
 
-        @SuppressWarnings("unchecked")
         @Override
         public boolean doCompare(Object lValue, Object rValue, Class<?> type, Locale locale, TimeZone timeZone, String format) throws Exception {
             Object convertedLvalue = MiniLangUtil.convertType(lValue, type, locale, timeZone, format);
@@ -140,7 +140,7 @@ public abstract class Compare {
             } catch (ClassCastException e) {
             }
             try {
-                Comparable comparable = (Comparable) convertedLvalue;
+                Comparable<Object> comparable = UtilGenerics.cast(convertedLvalue);
                 return comparable.compareTo(convertedRvalue) == 0;
             } catch (ClassCastException e) {
             }
@@ -150,7 +150,6 @@ public abstract class Compare {
 
     private static final class CompareGreater extends Compare {
 
-        @SuppressWarnings("unchecked")
         @Override
         public boolean doCompare(Object lValue, Object rValue, Class<?> type, Locale locale, TimeZone timeZone, String format) throws Exception {
             Object convertedLvalue = MiniLangUtil.convertType(lValue, type, locale, timeZone, format);
@@ -163,7 +162,7 @@ public abstract class Compare {
             } catch (ClassCastException e) {
             }
             try {
-                Comparable comparable = (Comparable) convertedLvalue;
+                Comparable<Object> comparable = UtilGenerics.cast(convertedLvalue);
                 return comparable.compareTo(convertedRvalue) > 0;
             } catch (ClassCastException e) {
             }
@@ -173,7 +172,6 @@ public abstract class Compare {
 
     private static final class CompareGreaterEquals extends Compare {
 
-        @SuppressWarnings("unchecked")
         @Override
         public boolean doCompare(Object lValue, Object rValue, Class<?> type, Locale locale, TimeZone timeZone, String format) throws Exception {
             Object convertedLvalue = MiniLangUtil.convertType(lValue, type, locale, timeZone, format);
@@ -186,7 +184,7 @@ public abstract class Compare {
             } catch (ClassCastException e) {
             }
             try {
-                Comparable comparable = (Comparable) convertedLvalue;
+                Comparable<Object> comparable = UtilGenerics.cast(convertedLvalue);
                 return comparable.compareTo(convertedRvalue) >= 0;
             } catch (ClassCastException e) {
             }
@@ -223,7 +221,6 @@ public abstract class Compare {
 
     private static final class CompareLess extends Compare {
 
-        @SuppressWarnings("unchecked")
         @Override
         public boolean doCompare(Object lValue, Object rValue, Class<?> type, Locale locale, TimeZone timeZone, String format) throws Exception {
             Object convertedLvalue = MiniLangUtil.convertType(lValue, type, locale, timeZone, format);
@@ -236,7 +233,7 @@ public abstract class Compare {
             } catch (ClassCastException e) {
             }
             try {
-                Comparable comparable = (Comparable) convertedLvalue;
+                Comparable<Object> comparable = UtilGenerics.cast(convertedLvalue);
                 return comparable.compareTo(convertedRvalue) < 0;
             } catch (ClassCastException e) {
             }
@@ -246,7 +243,6 @@ public abstract class Compare {
 
     private static final class CompareLessEquals extends Compare {
 
-        @SuppressWarnings("unchecked")
         @Override
         public boolean doCompare(Object lValue, Object rValue, Class<?> type, Locale locale, TimeZone timeZone, String format) throws Exception {
             Object convertedLvalue = MiniLangUtil.convertType(lValue, type, locale, timeZone, format);
@@ -259,7 +255,7 @@ public abstract class Compare {
             } catch (ClassCastException e) {
             }
             try {
-                Comparable comparable = (Comparable) convertedLvalue;
+                Comparable<Object> comparable = UtilGenerics.cast(convertedLvalue);
                 return comparable.compareTo(convertedRvalue) <= 0;
             } catch (ClassCastException e) {
             }
@@ -269,7 +265,6 @@ public abstract class Compare {
 
     private static final class CompareNotEquals extends Compare {
 
-        @SuppressWarnings("unchecked")
         @Override
         public boolean doCompare(Object lValue, Object rValue, Class<?> type, Locale locale, TimeZone timeZone, String format) throws Exception {
             Object convertedLvalue = MiniLangUtil.convertType(lValue, type, locale, timeZone, format);
@@ -287,7 +282,7 @@ public abstract class Compare {
             } catch (ClassCastException e) {
             }
             try {
-                Comparable comparable = (Comparable) convertedLvalue;
+                Comparable<Object> comparable = UtilGenerics.cast(convertedLvalue);
                 return comparable.compareTo(convertedRvalue) != 0;
             } catch (ClassCastException e) {
             }

Modified: ofbiz/trunk/framework/security/src/org/ofbiz/security/SecurityFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/security/src/org/ofbiz/security/SecurityFactory.java?rev=1674064&r1=1674063&r2=1674064&view=diff
==============================================================================
--- ofbiz/trunk/framework/security/src/org/ofbiz/security/SecurityFactory.java (original)
+++ ofbiz/trunk/framework/security/src/org/ofbiz/security/SecurityFactory.java Thu Apr 16 13:05:55 2015
@@ -83,7 +83,6 @@ public final class SecurityFactory {
 
     private SecurityFactory() {}
 
-    @SuppressWarnings("deprecation")
     private static final class OFBizSecurity implements Security {
 
         private Delegator delegator = null;

Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/EntityAutoEngine.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/EntityAutoEngine.java?rev=1674064&r1=1674063&r2=1674064&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/EntityAutoEngine.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/EntityAutoEngine.java Thu Apr 16 13:05:55 2015
@@ -101,7 +101,7 @@ public final class EntityAutoEngine exte
                 boolean pkValueInParameters = pkParam.isIn() && UtilValidate.isNotEmpty(parameters.get(pkParam.getFieldName()));
                 if (pkParam.isOut() && !pkValueInParameters) {
                     if (pkFieldNameOutOnly == null) {
-                        pkFieldNameOutOnly = new LinkedList();
+                        pkFieldNameOutOnly = new LinkedList<String>();
                         allPksInOnly = false;
                     }
                     pkFieldNameOutOnly.add(pkField.getName());

Modified: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Config.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Config.java?rev=1674064&r1=1674063&r2=1674064&view=diff
==============================================================================
--- ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Config.java (original)
+++ ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Config.java Thu Apr 16 13:05:55 2015
@@ -183,7 +183,7 @@ public class Config {
         instrumenterFile = getProp(props, "ofbiz.instrumenterFile", null);
 
         // loader classes
-        List loadersTmp = new ArrayList<Map<String, String>>();
+        List<Map<String, String>> loadersTmp = new ArrayList<Map<String, String>>();
         int currentPosition = 1;
         Map<String, String> loader = null;
         while (true) {

Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizAmountTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizAmountTransform.java?rev=1674064&r1=1674063&r2=1674064&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizAmountTransform.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizAmountTransform.java Thu Apr 16 13:05:55 2015
@@ -45,7 +45,6 @@ public class OfbizAmountTransform implem
     public static final String module = OfbizAmountTransform.class.getName();
     public static final String SPELLED_OUT_FORMAT = "spelled-out";
 
-    @SuppressWarnings("unchecked")
     private static String getArg(Map args, String key) {
         String  result = "";
         Object o = args.get(key);
@@ -64,7 +63,6 @@ public class OfbizAmountTransform implem
         }
         return result;
     }
-    @SuppressWarnings("unchecked")
     private static Double getAmount(Map args, String key) {
         if (args.containsKey(key)) {
             Object o = args.get(key);
@@ -91,7 +89,6 @@ public class OfbizAmountTransform implem
         }
         return Double.valueOf(0.00);
     }
-    @SuppressWarnings("unchecked")
     public Writer getWriter(final Writer out, Map args) {
         final StringBuilder buf = new StringBuilder();
 

Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizContentTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizContentTransform.java?rev=1674064&r1=1674063&r2=1674064&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizContentTransform.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizContentTransform.java Thu Apr 16 13:05:55 2015
@@ -42,7 +42,6 @@ public class OfbizContentTransform imple
 
     public final static String module = OfbizContentTransform.class.getName();
 
-    @SuppressWarnings("unchecked")
     private static String getArg(Map args, String key) {
         String  result = "";
         Object obj = args.get(key);
@@ -62,7 +61,6 @@ public class OfbizContentTransform imple
         return result;
     }
 
-    @SuppressWarnings("unchecked")
     public Writer getWriter(final Writer out, Map args) {
         final StringBuilder buf = new StringBuilder();
         final String imgSize = OfbizContentTransform.getArg(args, "variant");

Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizCurrencyTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizCurrencyTransform.java?rev=1674064&r1=1674063&r2=1674064&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizCurrencyTransform.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/OfbizCurrencyTransform.java Thu Apr 16 13:05:55 2015
@@ -48,7 +48,6 @@ public class OfbizCurrencyTransform impl
 
     public static final String module = OfbizCurrencyTransform.class.getName();
 
-    @SuppressWarnings("unchecked")
     private static String getArg(Map args, String key) {
         String  result = "";
         Object o = args.get(key);
@@ -68,7 +67,6 @@ public class OfbizCurrencyTransform impl
         return result;
     }
 
-    @SuppressWarnings("unchecked")
     private static BigDecimal getAmount(Map args, String key) {
         if (args.containsKey(key)) {
             Object o = args.get(key);
@@ -88,7 +86,6 @@ public class OfbizCurrencyTransform impl
         return BigDecimal.ZERO;
     }
 
-    @SuppressWarnings("unchecked")
     private static Integer getInteger(Map args, String key) {
         if (args.containsKey(key)) {
             Object o = args.get(key);
@@ -116,7 +113,6 @@ public class OfbizCurrencyTransform impl
         return null;
     }
 
-    @SuppressWarnings("unchecked")
     public Writer getWriter(final Writer out, Map args) {
         final StringBuilder buf = new StringBuilder();
 

Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/RenderWrappedTextTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/RenderWrappedTextTransform.java?rev=1674064&r1=1674063&r2=1674064&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/RenderWrappedTextTransform.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/RenderWrappedTextTransform.java Thu Apr 16 13:05:55 2015
@@ -37,7 +37,6 @@ public class RenderWrappedTextTransform
 
     public static final String module = RenderWrappedTextTransform.class.getName();
 
-    @SuppressWarnings("unchecked")
     public Writer getWriter(final Writer out, Map args) {
         final Environment env = Environment.getCurrentEnvironment();
         Map<String, Object> ctx = checkMap(FreeMarkerWorker.getWrappedObject("context", env), String.class, Object.class);

Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/SetRequestAttributeMethod.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/SetRequestAttributeMethod.java?rev=1674064&r1=1674063&r2=1674064&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/SetRequestAttributeMethod.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/ftl/SetRequestAttributeMethod.java Thu Apr 16 13:05:55 2015
@@ -39,7 +39,6 @@ public class SetRequestAttributeMethod i
     /*
      * @see freemarker.template.TemplateMethodModel#exec(java.util.List)
      */
-    @SuppressWarnings("unchecked")
     public Object exec(List args) throws TemplateModelException {
         if (args == null || args.size() != 2)
             throw new TemplateModelException("Invalid number of arguements");

Modified: ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java?rev=1674064&r1=1674063&r2=1674064&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java (original)
+++ ofbiz/trunk/framework/webtools/src/org/ofbiz/webtools/artifactinfo/ArtifactInfoFactory.java Thu Apr 16 13:05:55 2015
@@ -381,11 +381,10 @@ public class ArtifactInfoFactory {
     }
 
     // private methods
-    @SuppressWarnings("unchecked")
     private Callable<Void> prepareTaskForServiceAnalysis(final String serviceName) {
-        return new Callable() {
+        return new Callable<Void>() {
             @Override
-            public Callable<Void> call() throws Exception {
+            public Void call() throws Exception {
                 try {
                     getServiceArtifactInfo(serviceName);
                 } catch(Exception exc) {
@@ -396,11 +395,10 @@ public class ArtifactInfoFactory {
         };
     }
 
-    @SuppressWarnings("unchecked")
     private Callable<Void> prepareTaskForComponentAnalysis(final ComponentConfig componentConfig) {
-        return new Callable() {
+        return new Callable<Void>() {
             @Override
-            public Callable<Void> call() throws Exception {
+            public Void call() throws Exception {
                 String componentName = componentConfig.getGlobalName();
                 String rootComponentPath = componentConfig.getRootLocation();
                 List<File> screenFiles = new ArrayList<File>();

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/MenuWrapTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/MenuWrapTransform.java?rev=1674064&r1=1674063&r2=1674064&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/MenuWrapTransform.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/renderer/MenuWrapTransform.java Thu Apr 16 13:05:55 2015
@@ -70,7 +70,8 @@ public class MenuWrapTransform implement
     public static final String [] upSaveKeyNames = {"globalNodeTrail"};
     public static final String [] saveKeyNames = {"contentId", "subContentId", "subDataResourceTypeId", "mimeTypeId", "whenMap", "locale",  "wrapTemplateId", "encloseWrapText", "nullThruDatesOnly", "renderOnStart", "renderOnClose", "menuDefFile", "menuName", "associatedContentId", "wrapperClassName"};
 
-    @SuppressWarnings("unchecked")
+    
+    @SuppressWarnings("rawtypes")
     public Writer getWriter(final Writer out, Map args) {
         final Environment env = Environment.getCurrentEnvironment();
         final Delegator delegator = FreeMarkerWorker.getWrappedObject("delegator", env);

Modified: ofbiz/trunk/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/janrain/JanrainHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/janrain/JanrainHelper.java?rev=1674064&r1=1674063&r2=1674064&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/janrain/JanrainHelper.java (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/src/org/ofbiz/ecommerce/janrain/JanrainHelper.java Thu Apr 16 13:05:55 2015
@@ -140,10 +140,11 @@ public class JanrainHelper {
         query.put("format", "xml");
         query.put("apiKey", apiKey);
         StringBuffer sb = new StringBuffer();
-        for (Iterator it = query.entrySet().iterator(); it.hasNext();) {
-            if (sb.length() > 0) sb.append('&');
+        for (Iterator<Map.Entry<String, Object>> it = query.entrySet().iterator(); it.hasNext();) {
+            if (sb.length() > 0)
+                sb.append('&');
             try {
-                Map.Entry e = (Map.Entry)it.next();
+                Map.Entry<String, Object> e = it.next();
                 sb.append(URLEncoder.encode(e.getKey().toString(), "UTF-8"));
                 sb.append('=');
                 sb.append(URLEncoder.encode(e.getValue().toString(), "UTF-8"));