db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r898638 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/RuntimeStatisticsParser.java
Date Wed, 13 Jan 2010 03:41:58 GMT
Author: myrnavl
Date: Wed Jan 13 03:41:57 2010
New Revision: 898638

URL: http://svn.apache.org/viewvc?rev=898638&view=rev
Log:
DERBY-4514 - j2ME test failures relating to RuntimeStatisticsParser;
  now using org.apache.derbyTesting.junit.Utilities.split for JSR169

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/RuntimeStatisticsParser.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/RuntimeStatisticsParser.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/RuntimeStatisticsParser.java?rev=898638&r1=898637&r2=898638&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/RuntimeStatisticsParser.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/RuntimeStatisticsParser.java
Wed Jan 13 03:41:57 2010
@@ -417,8 +417,18 @@
         if (startStartIndex >= 0 && endStartIndex >= 0)
         {
             String positionLines = statistics.substring(startStartIndex, endStartIndex);
-            String [] startPositionLines = positionLines.split("\n");
-            return startPositionLines;}
+            if (JDBC.vmSupportsJSR169())
+            {
+                // do something else then split.
+                String [] startPositionLines = Utilities.split(positionLines, '\n');
+                return startPositionLines;
+            }
+            else
+            {
+                String [] startPositionLines = positionLines.split("\n");
+                return startPositionLines;
+            }
+        }
         else 
             return null;
         
@@ -435,8 +445,18 @@
         if (startStopIndex >= 0 && endStopIndex >= 0)
         {
             String positionLines = statistics.substring(startStopIndex, endStopIndex);
-            String [] startPositionLines = positionLines.split("\n");
-            return startPositionLines;}
+            if (JDBC.vmSupportsJSR169())
+            {
+                // do something else then split.
+                String [] stopPositionLines = Utilities.split(positionLines, '\n');
+                return stopPositionLines;
+            }
+            else
+            {
+                String [] stopPositionLines = positionLines.split("\n");
+                return stopPositionLines;
+            }
+        }
         else 
             return null;
     }



Mime
View raw message