openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1759362 - in /openjpa/trunk: openjpa-kernel/src/main/java/org/apache/openjpa/kernel/ openjpa-kernel/src/test/java/org/apache/openjpa/ee/ openjpa-lib/src/test/java/org/apache/openjpa/lib/util/ openjpa-persistence/src/main/java/org/apache/op...
Date Tue, 06 Sep 2016 05:14:19 GMT
Author: struberg
Date: Tue Sep  6 05:14:18 2016
New Revision: 1759362

URL: http://svn.apache.org/viewvc?rev=1759362&view=rev
Log:
OPENJPA-2662 remove serp.util.Strings.join

Modified:
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Filters.java
    openjpa/trunk/openjpa-kernel/src/test/java/org/apache/openjpa/ee/TestWASManagedRuntime.java
    openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/ClassUtilTest.java
    openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/StringUtilTest.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Filters.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Filters.java?rev=1759362&r1=1759361&r2=1759362&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Filters.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Filters.java Tue
Sep  6 05:14:18 2016
@@ -946,8 +946,7 @@ public class Filters {
                 value = null;
             else {
                 try {
-                    value = Strings.parse((String) value,
-                        setter.getParameterTypes()[0]);
+                    value = Strings.parse((String) value, setter.getParameterTypes()[0]);
                 } catch (Exception e) {
                     throw new UserException(_loc.get("bad-setter-hint-arg",
                         hintKey, value, setter.getParameterTypes()[0])).

Modified: openjpa/trunk/openjpa-kernel/src/test/java/org/apache/openjpa/ee/TestWASManagedRuntime.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/test/java/org/apache/openjpa/ee/TestWASManagedRuntime.java?rev=1759362&r1=1759361&r2=1759362&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/test/java/org/apache/openjpa/ee/TestWASManagedRuntime.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/test/java/org/apache/openjpa/ee/TestWASManagedRuntime.java
Tue Sep  6 05:14:18 2016
@@ -21,7 +21,6 @@ package org.apache.openjpa.ee;
 import junit.framework.TestCase;
 
 import org.apache.openjpa.lib.util.ClassUtil;
-import serp.util.Strings;
 
 /**
  * Test class for build transformation performed by WASManagedRuntime.

Modified: openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/ClassUtilTest.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/ClassUtilTest.java?rev=1759362&r1=1759361&r2=1759362&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/ClassUtilTest.java
(original)
+++ openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/ClassUtilTest.java
Tue Sep  6 05:14:18 2016
@@ -21,7 +21,6 @@ import java.util.concurrent.TimeUnit;
 import org.junit.Assert;
 import org.junit.Ignore;
 import org.junit.Test;
-import serp.util.Strings;
 
 public class ClassUtilTest {
 

Modified: openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/StringUtilTest.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/StringUtilTest.java?rev=1759362&r1=1759361&r2=1759362&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/StringUtilTest.java
(original)
+++ openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/util/StringUtilTest.java
Tue Sep  6 05:14:18 2016
@@ -18,6 +18,7 @@ package org.apache.openjpa.lib.util;
 
 import java.util.concurrent.TimeUnit;
 
+import org.apache.commons.lang3.StringUtils;
 import org.junit.Assert;
 import org.junit.Ignore;
 import org.junit.Test;
@@ -88,4 +89,18 @@ public class StringUtilTest {
         long stop = System.nanoTime();
         System.out.println("took: " + TimeUnit.NANOSECONDS.toMillis(stop - start));
     }
-}
+
+    @Test
+    @Ignore("only needed for manual performance tests")
+    public void testStringJoinPerformance() {
+        String[] vals = {"A", "BDS", "DSD", "XYZ"};
+        long start = System.nanoTime();
+        for (int i = 1; i < 10000000; i++) {
+            //X Strings.join(vals, ",");
+            StringUtils.join(vals, ",");
+        }
+
+        long stop = System.nanoTime();
+        System.out.println("took: " + TimeUnit.NANOSECONDS.toMillis(stop - start));
+    }
+}
\ No newline at end of file

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java?rev=1759362&r1=1759361&r2=1759362&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java
Tue Sep  6 05:14:18 2016
@@ -1290,8 +1290,7 @@ public class AnnotationPersistenceMetaDa
                     break;
                 case EXTERNAL_VALS:
                     if (isMetaDataMode())
-                        fmd.setExternalValues(Strings.join(((ExternalValues)
-                            anno).value(), ","));
+                        fmd.setExternalValues(StringUtils.join(((ExternalValues) anno).value(),
","));
                     break;
                 case EXTERNALIZER:
                     if (isMetaDataMode())



Mime
View raw message