harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r465457 - /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/ClassTest.java
Date Thu, 19 Oct 2006 03:30:43 GMT
Author: ndbeyer
Date: Wed Oct 18 20:30:41 2006
New Revision: 465457

URL: http://svn.apache.org/viewvc?view=rev&rev=465457
Log:
Apply patch for HARMONY-1895: [classlib] [luni/tests] endless recursion in ClassTest.test_getClasses_subtest0

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/ClassTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/ClassTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/ClassTest.java?view=diff&rev=465457&r1=465456&r2=465457
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/ClassTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/ClassTest.java
Wed Oct 18 20:30:41 2006
@@ -175,13 +175,22 @@
                 return new ProtectionDomain[0];
             }
 
+            private boolean recurring = false;
+
             public boolean isPriviledged() {
-                combine = false;
+                if (recurring) {
+                    return true;
+                }
                 try {
-                    AccessController.checkPermission(privCheckPermission);
-                } catch (SecurityException e) {
+                    recurring = true;
+                    combine = false;
+                    try {
+                        AccessController.checkPermission(privCheckPermission);
+                    } catch (SecurityException e) {}
+                    return !combine;
+                } finally {
+                    recurring = false;
                 }
-                return !combine;
             }
         }
 



Mime
View raw message