db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r958626 - in /db/derby/code/branches/10.5: ./ java/testing/org/apache/derbyTesting/functionTests/tests/lang/StreamsTest.java
Date Mon, 28 Jun 2010 16:33:53 GMT
Author: kmarsden
Date: Mon Jun 28 16:33:53 2010
New Revision: 958626

URL: http://svn.apache.org/viewvc?rev=958626&view=rev
Log:
DERBY-2318 testStreams(org.apache.derbyTesting.functionTests.te
sts.lang.StreamsTest)

Change test to get the StackTraceElements just once


Modified:
    db/derby/code/branches/10.5/   (props changed)
    db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/lang/StreamsTest.java

Propchange: db/derby/code/branches/10.5/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jun 28 16:33:53 2010
@@ -1,2 +1,2 @@
 /db/derby/code/branches/10.6:957000
-/db/derby/code/trunk:757811,769596,769602,769606,769962,772090,772337,772449,772534,774281,777105,779681,782991,785131,785139,785163,785570,785662,788369,788670,788674,788968,789264,790218,792434,793089,793588,794106,794303,794955,795166,796020,796027,796316,796372,797147,798347,798742,800523,803548,803948,805696,808494,808850,809643,810860,812669,816531,816536,819006,822289,823659,824694,829022,832379,833430,835286,881074,881444,882732,884163,887246,892912,897161,898635,901165,901648,901760,903108,908418,911315,915733,916075,916897,918359,921028,927430,928065,942286,942476,942480,942587,946794,948045,948069,951346,954748,955001,955634,956075,956445,956659
+/db/derby/code/trunk:757811,769596,769602,769606,769962,772090,772337,772449,772534,774281,777105,779681,782991,785131,785139,785163,785570,785662,788369,788670,788674,788968,789264,790218,792434,793089,793588,794106,794303,794955,795166,796020,796027,796316,796372,797147,798347,798742,800523,803548,803948,805696,808494,808850,809643,810860,812669,816531,816536,819006,822289,823659,824694,829022,832379,833430,835286,881074,881444,882732,884163,887246,892912,897161,898635,901165,901648,901760,903108,908418,911315,915733,916075,916897,918359,921028,927430,928065,942286,942476,942480,942587,946794,948045,948069,951346,954748,955001,955634,956075,956445,956659,958163

Modified: db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/lang/StreamsTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/lang/StreamsTest.java?rev=958626&r1=958625&r2=958626&view=diff
==============================================================================
--- db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/lang/StreamsTest.java
(original)
+++ db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/lang/StreamsTest.java
Mon Jun 28 16:33:53 2010
@@ -300,18 +300,19 @@ class DummyReader extends java.io.Reader
     }
     
     private void whereAmI() {
+        StackTraceElement[] stelements = new Throwable().getStackTrace();
         if (count == 0) {
             // see DERBY-2318 - some jvms report a line like:
             // at java.lang.Throwable<init>. Ignore all Throwable lines
             // for the count.
-            if ((new Throwable().getStackTrace().toString()).indexOf(
+            if (stelements.toString().indexOf(
                     "java.lang.Throwable".toLowerCase()) >=0)
             {
                 readerStackLevel = 
-                    new Throwable().getStackTrace().length - 1;
+                    stelements.length - 1;
             }
             else
-                readerStackLevel = new Throwable().getStackTrace().length;
+                readerStackLevel = stelements.length;
         }
     }
     



Mime
View raw message