openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1759614 - in /openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/ openjpa-kernel/src/main/java/or...
Date Wed, 07 Sep 2016 13:55:30 GMT
Author: struberg
Date: Wed Sep  7 13:55:30 2016
New Revision: 1759614

URL: http://svn.apache.org/viewvc?rev=1759614&view=rev
Log:
OPENJPA-2665 use Objects.equals instead of prorietary impl  

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/PCPath.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/ForeignKey.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/JoinSet.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PrimaryRow.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLBuffer.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DelegatingDataCache.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DelegatingQueryCache.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryKey.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AttachStrategy.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryImpl.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/CandidatePath.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/InMemoryExpressionFactory.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FetchGroup.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ArrayStateImage.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/FileValue.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ObjectValue.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/rop/AbstractNonSequentialResultList.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/rop/AbstractSequentialResultList.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/PCPath.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/PCPath.java?rev=1759614&r1=1759613&r2=1759614&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/PCPath.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/PCPath.java
Wed Sep  7 13:55:30 2016
@@ -23,8 +23,8 @@ import java.sql.SQLException;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.ListIterator;
+import java.util.Objects;
 
-import org.apache.commons.lang3.ObjectUtils;
 import org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration;
 import org.apache.openjpa.jdbc.kernel.JDBCStoreQuery;
 import org.apache.openjpa.jdbc.meta.ClassMapping;
@@ -61,10 +61,8 @@ import org.apache.openjpa.util.UserExcep
  *
  * @author Abe White
  */
-public class PCPath
-    extends CandidatePath
-    implements JDBCPath {
-	
+public class PCPath extends CandidatePath implements JDBCPath {
+
     protected static final String TRUE = "1 = 1";
     protected static final String FALSE = "1 <> 1";
 
@@ -1112,8 +1110,8 @@ public class PCPath
         if (!(other instanceof PCPath))
             return false;
         PCPath path = (PCPath) other;
-        return ObjectUtils.equals(_candidate, path._candidate)
-            && ObjectUtils.equals(_actions, path._actions);
+        return Objects.equals(_candidate, path._candidate)
+            && Objects.equals(_actions, path._actions);
     }
     
     public int getId() {
@@ -1158,7 +1156,7 @@ public class PCPath
                 return true;
             Action a = (Action) other;
             return op == a.op
-                && ObjectUtils.equals(data, a.data);
+                && Objects.equals(data, a.data);
         }
     }
 }

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/ForeignKey.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/ForeignKey.java?rev=1759614&r1=1759613&r2=1759614&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/ForeignKey.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/ForeignKey.java
Wed Sep  7 13:55:30 2016
@@ -24,8 +24,8 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.LinkedHashMap;
 import java.util.List;
+import java.util.Objects;
 
-import org.apache.commons.lang3.ObjectUtils;
 import org.apache.openjpa.jdbc.identifier.DBIdentifier;
 import org.apache.openjpa.jdbc.sql.DBDictionary;
 import org.apache.openjpa.lib.log.Log;
@@ -558,7 +558,7 @@ public class ForeignKey
      * Join a local column to a primary key column of another table.
      */
     public void join(Column local, Column toPK) {
-        if (!ObjectUtils.equals(local.getTable(), getTable()))
+        if (!Objects.equals(local.getTable(), getTable()))
             throw new InvalidStateException(_loc.get("table-mismatch",
                 local.getTable(), getTable()));
 
@@ -776,7 +776,7 @@ public class ForeignKey
         if (vals.length != fkVals.length)
             return false;
         for (int i = 0; i < vals.length; i++)
-            if (!ObjectUtils.equals(vals[i], fkVals[i]))
+            if (!Objects.equals(vals[i], fkVals[i]))
                 return false;
         return true;
     }

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/JoinSet.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/JoinSet.java?rev=1759614&r1=1759613&r2=1759614&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/JoinSet.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/JoinSet.java Wed
Sep  7 13:55:30 2016
@@ -25,7 +25,7 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.NoSuchElementException;
 
-import org.apache.commons.lang3.ObjectUtils;
+import java.util.Objects;
 
 /**
  * Set type that recognizes that inner joins should take precedence
@@ -382,8 +382,8 @@ class JoinSet {
             if (!(other instanceof Node))
                 return false;
             Node node = (Node) other;
-            return ObjectUtils.equals(join, node.join)
-                && ObjectUtils.equals(next, node.next);
+            return Objects.equals(join, node.join)
+                && Objects.equals(next, node.next);
         }
 
         public Object clone() {

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PrimaryRow.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PrimaryRow.java?rev=1759614&r1=1759613&r2=1759614&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PrimaryRow.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PrimaryRow.java Wed
Sep  7 13:55:30 2016
@@ -20,7 +20,7 @@ package org.apache.openjpa.jdbc.sql;
 
 import java.sql.SQLException;
 
-import org.apache.commons.lang3.ObjectUtils;
+import java.util.Objects;
 import org.apache.openjpa.jdbc.meta.ClassMapping;
 import org.apache.openjpa.jdbc.meta.RelationId;
 import org.apache.openjpa.jdbc.schema.Column;
@@ -380,7 +380,7 @@ public class PrimaryRow
      * Return true if the two values should be considered equal.
      */
     private static boolean rowValueEquals(Object o1, Object o2) {
-        if (ObjectUtils.equals(o1, o2))
+        if (Objects.equals(o1, o2))
             return true;
 
         // check for numeric equality (bug #1151)

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLBuffer.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLBuffer.java?rev=1759614&r1=1759613&r2=1759614&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLBuffer.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SQLBuffer.java Wed
Sep  7 13:55:30 2016
@@ -29,7 +29,7 @@ import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.commons.lang3.ObjectUtils;
+import java.util.Objects;
 import org.apache.openjpa.jdbc.identifier.DBIdentifier;
 import org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration;
 import org.apache.openjpa.jdbc.kernel.exps.CollectionParam;
@@ -630,7 +630,7 @@ public final class SQLBuffer
 
         SQLBuffer buf = (SQLBuffer) other;
         return _sql.equals(buf._sql)
-            && ObjectUtils.equals(_params, buf._params);
+            && Objects.equals(_params, buf._params);
     }
 
     /**

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DelegatingDataCache.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DelegatingDataCache.java?rev=1759614&r1=1759613&r2=1759614&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DelegatingDataCache.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DelegatingDataCache.java
Wed Sep  7 13:55:30 2016
@@ -24,7 +24,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.commons.lang3.ObjectUtils;
+import java.util.Objects;
 import org.apache.openjpa.util.RuntimeExceptionTranslator;
 
 /**
@@ -85,7 +85,7 @@ public class DelegatingDataCache
             return true;
         if (other instanceof DelegatingDataCache)
             other = ((DelegatingDataCache) other).getInnermostDelegate();
-        return ObjectUtils.equals(getInnermostDelegate(), other);
+        return Objects.equals(getInnermostDelegate(), other);
     }
 
     /**

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DelegatingQueryCache.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DelegatingQueryCache.java?rev=1759614&r1=1759613&r2=1759614&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DelegatingQueryCache.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DelegatingQueryCache.java
Wed Sep  7 13:55:30 2016
@@ -18,7 +18,7 @@
  */
 package org.apache.openjpa.datacache;
 
-import org.apache.commons.lang3.ObjectUtils;
+import java.util.Objects;
 import org.apache.openjpa.kernel.QueryStatistics;
 import org.apache.openjpa.util.RuntimeExceptionTranslator;
 
@@ -77,7 +77,7 @@ public class DelegatingQueryCache
             return true;
         if (other instanceof DelegatingQueryCache)
             other = ((DelegatingQueryCache) other).getInnermostDelegate();
-        return ObjectUtils.equals(getInnermostDelegate(), other);
+        return Objects.equals(getInnermostDelegate(), other);
     }
 
     /**

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryKey.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryKey.java?rev=1759614&r1=1759613&r2=1759614&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryKey.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryKey.java
Wed Sep  7 13:55:30 2016
@@ -36,7 +36,7 @@ import java.util.Set;
 import java.util.SortedSet;
 import java.util.TreeSet;
 
-import org.apache.commons.lang3.ObjectUtils;
+import java.util.Objects;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.openjpa.enhance.PCRegistry;
 import org.apache.openjpa.kernel.Query;
@@ -408,8 +408,8 @@ public class QueryKey
             && _ignoreChanges == other._ignoreChanges
             && _rangeStart == other._rangeStart
             && _rangeEnd == other._rangeEnd
-            && ObjectUtils.equals(_query, other._query)
-            && ObjectUtils.equals(_params, other._params);
+            && Objects.equals(_query, other._query)
+            && Objects.equals(_params, other._params);
     }
 
     /**

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AttachStrategy.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AttachStrategy.java?rev=1759614&r1=1759613&r2=1759614&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AttachStrategy.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AttachStrategy.java
Wed Sep  7 13:55:30 2016
@@ -25,7 +25,7 @@ import java.util.Map;
 import java.util.Set;
 import java.util.Map.Entry;
 
-import org.apache.commons.lang3.ObjectUtils;
+import java.util.Objects;
 import org.apache.openjpa.enhance.PersistenceCapable;
 import org.apache.openjpa.enhance.StateManager;
 import org.apache.openjpa.lib.util.Localizer;
@@ -225,7 +225,7 @@ abstract class AttachStrategy
                     else {
                         PersistenceCapable intopc = topc;
                         if (!fmd.isEmbeddedPC() && frmpc != null && topc
!= null
-                            && !ObjectUtils.equals(topc.pcFetchObjectId(),
+                            && !Objects.equals(topc.pcFetchObjectId(),
                             manager.getDetachedObjectId(frmpc))) {
                             intopc = null;
                         }

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryImpl.java?rev=1759614&r1=1759613&r2=1759614&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryImpl.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryImpl.java Wed
Sep  7 13:55:30 2016
@@ -33,7 +33,7 @@ import java.util.Map.Entry;
 import java.util.concurrent.locks.ReentrantLock;
 
 import org.apache.commons.collections.map.LinkedMap;
-import org.apache.commons.lang3.ObjectUtils;
+import java.util.Objects;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.openjpa.conf.OpenJPAConfiguration;
 import org.apache.openjpa.enhance.PersistenceCapable;
@@ -1848,7 +1848,7 @@ public class QueryImpl
                 return false;
             if (key.subclasses != subclasses)
                 return false;
-            if (!ObjectUtils.equals(key.storeKey, storeKey))
+            if (!Objects.equals(key.storeKey, storeKey))
                 return false;
 
             // allow either candidate type to be null because it might be

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/CandidatePath.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/CandidatePath.java?rev=1759614&r1=1759613&r2=1759614&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/CandidatePath.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/CandidatePath.java
Wed Sep  7 13:55:30 2016
@@ -22,7 +22,7 @@ import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.ListIterator;
 
-import org.apache.commons.lang3.ObjectUtils;
+import java.util.Objects;
 import org.apache.openjpa.kernel.Broker;
 import org.apache.openjpa.kernel.Filters;
 import org.apache.openjpa.kernel.OpenJPAStateManager;
@@ -161,7 +161,7 @@ public class CandidatePath
             return true;
         if (!(other instanceof CandidatePath))
             return false;
-        return ObjectUtils.equals(_actions, ((CandidatePath) other)._actions);
+        return Objects.equals(_actions, ((CandidatePath) other)._actions);
     }
 
     /**

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/InMemoryExpressionFactory.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/InMemoryExpressionFactory.java?rev=1759614&r1=1759613&r2=1759614&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/InMemoryExpressionFactory.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/InMemoryExpressionFactory.java
Wed Sep  7 13:55:30 2016
@@ -30,7 +30,7 @@ import java.util.List;
 import java.util.ListIterator;
 import java.util.Set;
 
-import org.apache.commons.lang3.ObjectUtils;
+import java.util.Objects;
 import org.apache.openjpa.kernel.Extent;
 import org.apache.openjpa.kernel.StoreContext;
 import org.apache.openjpa.lib.util.Localizer;
@@ -140,7 +140,7 @@ public class InMemoryExpressionFactory
             for (int i = 0; i < exps.grouping.length; i++) {
                 curs[i] = ((Val) exps.grouping[i]).evaluate(pc, pc, ctx,
                     params);
-                eq = eq && ObjectUtils.equals(prevs[i], curs[i]);
+                eq = eq && Objects.equals(prevs[i], curs[i]);
             }
 
             // if this object's grouping values differ from the prev,
@@ -695,7 +695,7 @@ public class InMemoryExpressionFactory
             if (_arr.length != arr.length)
                 return false;
             for (int i = 0; i < _arr.length; i++)
-                if (!ObjectUtils.equals(_arr[i], arr[i]))
+                if (!Objects.equals(_arr[i], arr[i]))
                     return false;
             return true;
         }

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FetchGroup.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FetchGroup.java?rev=1759614&r1=1759613&r2=1759614&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FetchGroup.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FetchGroup.java Wed
Sep  7 13:55:30 2016
@@ -28,7 +28,7 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.ObjectUtils;
+import java.util.Objects;
 import org.apache.openjpa.lib.util.Localizer;
 import org.apache.openjpa.util.MetaDataException;
 
@@ -375,7 +375,7 @@ public class FetchGroup
             return false;
         FetchGroup that = (FetchGroup) other;
         return _name.equals(that._name)
-            && ObjectUtils.equals(_meta, that._meta);
+            && Objects.equals(_meta, that._meta);
     }
 
     public int hashCode() {

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ArrayStateImage.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ArrayStateImage.java?rev=1759614&r1=1759613&r2=1759614&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ArrayStateImage.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ArrayStateImage.java
Wed Sep  7 13:55:30 2016
@@ -19,8 +19,9 @@
 package org.apache.openjpa.util;
 
 import java.util.BitSet;
+import java.util.Objects;
 
-import org.apache.commons.lang3.ObjectUtils;
+import java.util.Objects;
 
 /**
  * Utilities for dealing with a simple state image consisting of an
@@ -98,7 +99,7 @@ public class ArrayStateImage {
         BitSet loaded2 = getLoaded(state2);
         for (int i = 0, max = loaded1.length(); i < max; i++) {
             if (loaded1.get(i) && loaded2.get(i)
-                && !ObjectUtils.equals(state1[i], state2[i]))
+                && !Objects.equals(state1[i], state2[i]))
                 return false;
         }
         return true;

Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/FileValue.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/FileValue.java?rev=1759614&r1=1759613&r2=1759614&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/FileValue.java (original)
+++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/FileValue.java Wed
Sep  7 13:55:30 2016
@@ -20,8 +20,8 @@ package org.apache.openjpa.lib.conf;
 
 import java.io.File;
 import java.security.AccessController;
+import java.util.Objects;
 
-import org.apache.commons.lang3.ObjectUtils;
 import org.apache.openjpa.lib.util.J2DoPrivHelper;
 
 /**
@@ -48,7 +48,7 @@ public class FileValue extends Value {
         assertChangeable();
         File oldValue = this.value;
         this.value = value;
-        if (!ObjectUtils.equals(oldValue, value))
+        if (!Objects.equals(oldValue, value))
             valueChanged();
     }
 

Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ObjectValue.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ObjectValue.java?rev=1759614&r1=1759613&r2=1759614&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ObjectValue.java (original)
+++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ObjectValue.java Wed
Sep  7 13:55:30 2016
@@ -19,8 +19,8 @@
 package org.apache.openjpa.lib.conf;
 
 import java.security.AccessController;
+import java.util.Objects;
 
-import org.apache.commons.lang3.ObjectUtils;
 import org.apache.openjpa.lib.util.J2DoPrivHelper;
 import org.apache.openjpa.lib.util.Localizer;
 import org.apache.openjpa.lib.util.ReferenceMap;
@@ -69,7 +69,7 @@ public class ObjectValue extends Value {
         if (!derived) assertChangeable();
         Object oldValue = _value;
         _value = obj;
-        if (!derived && !ObjectUtils.equals(obj, oldValue)) {
+        if (!derived && !Objects.equals(obj, oldValue)) {
             objectChanged();
             valueChanged();
         }

Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/rop/AbstractNonSequentialResultList.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/rop/AbstractNonSequentialResultList.java?rev=1759614&r1=1759613&r2=1759614&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/rop/AbstractNonSequentialResultList.java
(original)
+++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/rop/AbstractNonSequentialResultList.java
Wed Sep  7 13:55:30 2016
@@ -25,8 +25,8 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.ListIterator;
 import java.util.NoSuchElementException;
+import java.util.Objects;
 
-import org.apache.commons.lang3.ObjectUtils;
 
 /**
  * Abstract base class for random-access result lists. Unlike the
@@ -53,7 +53,7 @@ public abstract class AbstractNonSequent
             obj = getInternal(i);
             if (obj == PAST_END)
                 break;
-            if (ObjectUtils.equals(o, obj))
+            if (Objects.equals(o, obj))
                 return true;
         }
         return false;
@@ -82,7 +82,7 @@ public abstract class AbstractNonSequent
             obj = getInternal(i);
             if (obj == PAST_END)
                 break;
-            if (ObjectUtils.equals(o, obj))
+            if (Objects.equals(o, obj))
                 return i;
         }
         return -1;
@@ -96,7 +96,7 @@ public abstract class AbstractNonSequent
             obj = getInternal(i);
             if (obj == PAST_END)
                 break;
-            if (ObjectUtils.equals(o, obj))
+            if (Objects.equals(o, obj))
                 index = i;
         }
         return index;

Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/rop/AbstractSequentialResultList.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/rop/AbstractSequentialResultList.java?rev=1759614&r1=1759613&r2=1759614&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/rop/AbstractSequentialResultList.java
(original)
+++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/rop/AbstractSequentialResultList.java
Wed Sep  7 13:55:30 2016
@@ -23,8 +23,8 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.ListIterator;
+import java.util.Objects;
 
-import org.apache.commons.lang3.ObjectUtils;
 
 /**
  * Abstract base class for sequential result lists. Unlike the
@@ -43,7 +43,7 @@ public abstract class AbstractSequential
     public boolean contains(Object o) {
         assertOpen();
         for (Iterator itr = itr(0); itr.hasNext();)
-            if (ObjectUtils.equals(o, itr.next()))
+            if (Objects.equals(o, itr.next()))
                 return true;
         return false;
     }
@@ -65,7 +65,7 @@ public abstract class AbstractSequential
         assertOpen();
         int index = 0;
         for (Iterator itr = itr(0); itr.hasNext(); index++)
-            if (ObjectUtils.equals(o, itr.next()))
+            if (Objects.equals(o, itr.next()))
                 return index;
         return -1;
     }
@@ -75,7 +75,7 @@ public abstract class AbstractSequential
         int index = -1;
         int i = 0;
         for (Iterator itr = itr(0); itr.hasNext(); i++)
-            if (ObjectUtils.equals(o, itr.next()))
+            if (Objects.equals(o, itr.next()))
                 index = i;
         return index;
     }



Mime
View raw message