svn commit: r1857087 - in /ofbiz/ofbiz-framework/trunk/framework: base/src/main/java/org/apache/ofbiz/base/test/ base/src/main/java/org/apache/ofbiz/base/util/cache/test/ entity/src/main/java/org/apache/ofbiz/entity/condition/ entity/src/main/java/org/...

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

svn commit: r1857087 - in /ofbiz/ofbiz-framework/trunk/framework: base/src/main/java/org/apache/ofbiz/base/test/ base/src/main/java/org/apache/ofbiz/base/util/cache/test/ entity/src/main/java/org/apache/ofbiz/entity/condition/ entity/src/main/java/org/...

mthl
Author: mthl
Date: Sun Apr  7 22:00:16 2019
New Revision: 1857087

URL: http://svn.apache.org/viewvc?rev=1857087&view=rev
Log:
Fixed: Remove unused type parameters (OFBIZ-10909)

No functional change.

Modified:
    ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/test/GenericTestCaseBase.java
    ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/cache/test/UtilCacheTests.java
    ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityClause.java
    ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityComparisonOperator.java
    ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityExpr.java
    ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityJoinOperator.java
    ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityOperator.java
    ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/finder/EntityFinderUtil.java
    ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/mail/MimeMessageWrapper.java

Modified: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/test/GenericTestCaseBase.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/test/GenericTestCaseBase.java?rev=1857087&r1=1857086&r2=1857087&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/test/GenericTestCaseBase.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/test/GenericTestCaseBase.java Sun Apr  7 22:00:16 2019
@@ -87,11 +87,11 @@ public abstract class GenericTestCaseBas
         }
     }
 
-    public static <T> void assertNotEquals(Object wanted, Object got) {
+    public static void assertNotEquals(Object wanted, Object got) {
         assertNotEquals(null, wanted, got);
     }
 
-    public static <T> void assertNotEquals(String msg, Object wanted, Object got) {
+    public static void assertNotEquals(String msg, Object wanted, Object got) {
         if (wanted == null) {
             if (got != null) {
                 return;
@@ -223,7 +223,7 @@ OUTER:
         }
     }
 
-    private static <T> void assertEqualsArrayArray(String msg, Object wanted, Object got) {
+    private static void assertEqualsArrayArray(String msg, Object wanted, Object got) {
         int i = 0;
         while (i < Array.getLength(wanted) && i < Array.getLength(got)) {
             Object left = Array.get(wanted, i);

Modified: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/cache/test/UtilCacheTests.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/cache/test/UtilCacheTests.java?rev=1857087&r1=1857086&r2=1857087&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/cache/test/UtilCacheTests.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/cache/test/UtilCacheTests.java Sun Apr  7 22:00:16 2019
@@ -38,11 +38,11 @@ import org.apache.ofbiz.base.util.cache.
 public class UtilCacheTests extends GenericTestCaseBase implements Serializable {
     public static final String module = UtilCacheTests.class.getName();
 
-    protected static abstract class Change<V> {
+    protected static abstract class Change {
         protected int count = 1;
     }
 
-    protected static final class Removal<V> extends Change<V> {
+    protected static final class Removal<V> extends Change {
         private final V oldValue;
 
         protected Removal(V oldValue) {
@@ -64,7 +64,7 @@ public class UtilCacheTests extends Gene
         }
     }
 
-    protected static final class Addition<V> extends Change<V> {
+    protected static final class Addition<V> extends Change {
         private final V newValue;
 
         protected Addition(V newValue) {
@@ -86,7 +86,7 @@ public class UtilCacheTests extends Gene
         }
     }
 
-    protected static final class Update<V> extends Change<V> {
+    protected static final class Update<V> extends Change {
         private final V newValue;
         private final V oldValue;
 
@@ -114,15 +114,15 @@ public class UtilCacheTests extends Gene
     }
 
     protected static class Listener<K, V> implements CacheListener<K, V> {
-        protected Map<K, Set<Change<V>>> changeMap = new HashMap<>();
+        protected Map<K, Set<Change>> changeMap = new HashMap<>();
 
-        private void add(K key, Change<V> change) {
-            Set<Change<V>> changeSet = changeMap.get(key);
+        private void add(K key, Change change) {
+            Set<Change> changeSet = changeMap.get(key);
             if (changeSet == null) {
                 changeSet = new HashSet<>();
                 changeMap.put(key, changeSet);
             }
-            for (Change<V> checkChange: changeSet) {
+            for (Change checkChange: changeSet) {
                 if (checkChange.equals(change)) {
                     checkChange.count++;
                     return;

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityClause.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityClause.java?rev=1857087&r1=1857086&r2=1857087&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityClause.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityClause.java Sun Apr  7 22:00:16 2019
@@ -37,13 +37,13 @@ public class EntityClause {
     private String secondField = "";
     private ModelEntity firstModelEntity = null;
     private ModelEntity secondModelEntity = null;
-    private EntityOperator<?,?,?> interFieldOperation = null;
-    private EntityOperator<?,?,?> intraFieldOperation = null;
+    private EntityOperator<?,?> interFieldOperation = null;
+    private EntityOperator<?,?> intraFieldOperation = null;
 
     private Object value = null;
     public EntityClause() {}
 
-    public EntityClause(String firstEntity, String secondEntity, String firstField, String secondField, EntityOperator<?, ?, ?> interFieldOperation, EntityOperator<?, ?, ?> intraFieldOperation) {
+    public EntityClause(String firstEntity, String secondEntity, String firstField, String secondField, EntityOperator<?, ?> interFieldOperation, EntityOperator<?, ?> intraFieldOperation) {
         this.firstEntity = firstEntity;
         this.secondEntity = secondEntity;
         this.firstField = firstField;
@@ -52,7 +52,7 @@ public class EntityClause {
         this.intraFieldOperation = intraFieldOperation;
     }
 
-    public EntityClause(String firstEntity, String firstField, Object value, EntityOperator<?, ?, ?> interFieldOperation, EntityOperator<?, ?, ?> intraFieldOperation) {
+    public EntityClause(String firstEntity, String firstField, Object value, EntityOperator<?, ?> interFieldOperation, EntityOperator<?, ?> intraFieldOperation) {
         this.firstEntity = firstEntity;
         this.firstField = firstField;
         this.value = value;
@@ -83,11 +83,11 @@ public class EntityClause {
         return value;
     }
 
-    public <L,R,T> EntityOperator<L,R,T> getInterFieldOperation() {
+    public <L,R> EntityOperator<L,R> getInterFieldOperation() {
         return UtilGenerics.cast(interFieldOperation);
     }
 
-    public <L,R,T> EntityOperator<L,R,T> getIntraFieldOperation() {
+    public <L,R> EntityOperator<L,R> getIntraFieldOperation() {
         return UtilGenerics.cast(intraFieldOperation);
     }
 
@@ -107,11 +107,11 @@ public class EntityClause {
         this.secondField = secondField;
     }
 
-    public <L,R,T> void setInterFieldOperation(EntityOperator<L,R,T> interFieldOperation) {
+    public <L,R> void setInterFieldOperation(EntityOperator<L,R> interFieldOperation) {
         this.interFieldOperation = interFieldOperation;
     }
 
-    public <L,R,T> void setIntraFieldOperation(EntityOperator<L,R,T> intraFieldOperation) {
+    public <L,R> void setIntraFieldOperation(EntityOperator<L,R> intraFieldOperation) {
         this.intraFieldOperation = intraFieldOperation;
     }
 

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityComparisonOperator.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityComparisonOperator.java?rev=1857087&r1=1857086&r2=1857087&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityComparisonOperator.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityComparisonOperator.java Sun Apr  7 22:00:16 2019
@@ -43,7 +43,7 @@ import org.apache.oro.text.regex.Perl5Ma
  * Base class for comparisons.
  */
 @SuppressWarnings("serial")
-public abstract class EntityComparisonOperator<L, R> extends EntityOperator<L, R, Boolean> {
+public abstract class EntityComparisonOperator<L, R> extends EntityOperator<L, R> {
 
     public static final String module = EntityComparisonOperator.class.getName();
 

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityExpr.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityExpr.java?rev=1857087&r1=1857086&r2=1857087&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityExpr.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityExpr.java Sun Apr  7 22:00:16 2019
@@ -45,7 +45,7 @@ public final class EntityExpr implements
     /** The left hand side of the expression.  */
     private final Object lhs;
     /** The operator used to combine the two sides of the expression.  */
-    private final EntityOperator<Object, Object, ?> operator;
+    private final EntityOperator<Object, Object> operator;
     /** The right hand side of the expression.  */
     private final Object rhs;
 
@@ -120,7 +120,7 @@ public final class EntityExpr implements
      *
      * @return the operator used to combine the two sides of the condition expression.
      */
-    public <L,R,T> EntityOperator<L,R,T> getOperator() {
+    public <L,R> EntityOperator<L,R> getOperator() {
         return UtilGenerics.cast(operator);
     }
 

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityJoinOperator.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityJoinOperator.java?rev=1857087&r1=1857086&r2=1857087&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityJoinOperator.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityJoinOperator.java Sun Apr  7 22:00:16 2019
@@ -37,7 +37,7 @@ import org.apache.ofbiz.entity.model.Mod
  *
  */
 @SuppressWarnings("serial")
-public class EntityJoinOperator extends EntityOperator<EntityCondition, EntityCondition, Boolean> {
+public class EntityJoinOperator extends EntityOperator<EntityCondition, EntityCondition> {
 
     protected boolean shortCircuitValue;
 

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityOperator.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityOperator.java?rev=1857087&r1=1857086&r2=1857087&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityOperator.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/condition/EntityOperator.java Sun Apr  7 22:00:16 2019
@@ -42,7 +42,7 @@ import org.apache.ofbiz.entity.model.Mod
  *
  */
 @SuppressWarnings("serial")
-public abstract class EntityOperator<L, R, T> implements Serializable {
+public abstract class EntityOperator<L, R> implements Serializable {
 
     public static final int ID_EQUALS = 1;
     public static final int ID_NOT_EQUAL = 2;
@@ -59,25 +59,25 @@ public abstract class EntityOperator<L,
     public static final int ID_NOT_IN = 13;
     public static final int ID_NOT_LIKE = 14;
 
-    private static HashMap<String, EntityOperator<?,?,?>> registry = new HashMap<>();
+    private static HashMap<String, EntityOperator<?,?>> registry = new HashMap<>();
 
-    private static <L,R,T> void registerCase(String name, EntityOperator<L,R,T> operator) {
+    private static <L,R> void registerCase(String name, EntityOperator<L,R> operator) {
         registry.put(name.toLowerCase(Locale.getDefault()), operator);
         registry.put(name.toUpperCase(Locale.getDefault()), operator);
     }
 
-    public static <L,R,T> void register(String name, EntityOperator<L,R,T> operator) {
+    public static <L,R> void register(String name, EntityOperator<L,R> operator) {
         registerCase(name, operator);
         registerCase(name.replaceAll("-", "_"), operator);
         registerCase(name.replaceAll("_", "-"), operator);
     }
 
-    public static <L,R,T> EntityOperator<L,R,T> lookup(String name) {
+    public static <L,R> EntityOperator<L,R> lookup(String name) {
         return UtilGenerics.cast(registry.get(name));
     }
 
     public static <L,R> EntityComparisonOperator<L,R> lookupComparison(String name) {
-        EntityOperator<?,?,Boolean> operator = lookup(name);
+        EntityOperator<?,?> operator = lookup(name);
         if (!(operator instanceof EntityComparisonOperator<?,?>)) {
             throw new IllegalArgumentException(name + " is not a comparison operator");
         }
@@ -85,7 +85,7 @@ public abstract class EntityOperator<L,
     }
 
     public static EntityJoinOperator lookupJoin(String name) {
-        EntityOperator<?,?,Boolean> operator = lookup(name);
+        EntityOperator<?,?> operator = lookup(name);
         if (!(operator instanceof EntityJoinOperator)) {
             throw new IllegalArgumentException(name + " is not a join operator");
         }
@@ -231,8 +231,8 @@ public abstract class EntityOperator<L,
         if (this == obj) {
             return true;
         }
-        if (obj instanceof EntityOperator<?,?,?>) {
-            EntityOperator<?,?,?> otherOper = UtilGenerics.cast(obj);
+        if (obj instanceof EntityOperator<?,?>) {
+            EntityOperator<?,?> otherOper = UtilGenerics.cast(obj);
             return this.idInt == otherOper.idInt;
         }
         return false;

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/finder/EntityFinderUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/finder/EntityFinderUtil.java?rev=1857087&r1=1857086&r2=1857087&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/finder/EntityFinderUtil.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/finder/EntityFinderUtil.java Sun Apr  7 22:00:16 2019
@@ -154,7 +154,7 @@ public final class EntityFinderUtil {
     @SuppressWarnings("serial")
     public static final class ConditionExpr implements Condition {
         private final String fieldName;
-        private final EntityOperator<?,?,?> operator;
+        private final EntityOperator<?,?> operator;
         private final FlexibleMapAccessor<Object> envNameAcsr;
         private final FlexibleStringExpander valueExdr;
         private final FlexibleStringExpander ignoreExdr;
@@ -258,7 +258,7 @@ public final class EntityFinderUtil {
     @SuppressWarnings("serial")
     public static final class ConditionList implements Condition {
         private final List<Condition> conditionList;
-        private final EntityOperator<?,?,?> operator;
+        private final EntityOperator<?,?> operator;
 
         public ConditionList(Element conditionListElement) {
             String operatorAttribute = conditionListElement.getAttribute("combine");

Modified: ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/mail/MimeMessageWrapper.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/mail/MimeMessageWrapper.java?rev=1857087&r1=1857086&r2=1857087&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/mail/MimeMessageWrapper.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/mail/MimeMessageWrapper.java Sun Apr  7 22:00:16 2019
@@ -525,14 +525,14 @@ public class MimeMessageWrapper implemen
     }
 
     static {
-        Converters.registerConverter(new MimeMessageToString<>());
+        Converters.registerConverter(new MimeMessageToString());
     }
 
     /**
      * Convert MimeMessageWrapper to String. This is used when sending emails.
      *
      */
-    private static class MimeMessageToString<E> extends AbstractConverter<MimeMessageWrapper, String> {
+    private static class MimeMessageToString extends AbstractConverter<MimeMessageWrapper, String> {
         public MimeMessageToString() {
             super(MimeMessageWrapper.class, String.class);
         }