harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r473357 - in /incubator/harmony/enhanced/drlvm/trunk/vm/vmcore: include/version_svn_tag.h src/kernel_classes/javasrc/java/lang/reflect/ReflectExporter.java
Date Fri, 10 Nov 2006 14:43:42 GMT
Author: gshimansky
Date: Fri Nov 10 06:43:42 2006
New Revision: 473357

URL: http://svn.apache.org/viewvc?view=rev&rev=473357
Log:
Applied HARMONY-1931 [drlvm][unit] Classlib test javax.swing.AbstractActionTest.testClone
fails on drlvm

Tests passed on win32 and ubuntu


Modified:
    incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/version_svn_tag.h
    incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/reflect/ReflectExporter.java

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/version_svn_tag.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/version_svn_tag.h?view=diff&rev=473357&r1=473356&r2=473357
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/version_svn_tag.h (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/version_svn_tag.h Fri Nov 10
06:43:42 2006
@@ -18,6 +18,6 @@
 #ifndef _VERSION_SVN_TAG_
 #define _VERSION_SVN_TAG_
 
-#define VERSION_SVN_TAG  "473137"
+#define VERSION_SVN_TAG  "473316"
 
 #endif // _VERSION_SVN_TAG_

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/reflect/ReflectExporter.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/reflect/ReflectExporter.java?view=diff&rev=473357&r1=473356&r2=473357
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/reflect/ReflectExporter.java
(original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/reflect/ReflectExporter.java
Fri Nov 10 06:43:42 2006
@@ -158,21 +158,25 @@
             return true;
         }
         int modifiers = callee.getModifiers();
-        if (Modifier.isPrivate(modifiers)) {
+	    Class calleeDeclaringClass = callee.getDeclaringClass();
+	    if (calleeDeclaringClass == null) {
+	        // the callee is either a top level class or a local class
+            if (Modifier.isPublic(modifiers) || hasSamePackage(callee, caller)) {
+	            return true;
+	        }
+	        // other top level classes and local classes 
             return false;
-        }
-        if (Modifier.isPublic(modifiers) || hasSamePackage(callee, caller)) {
-            return allowClassAccess(callee.getDeclaringClass(), caller);
-        }
-        return false;
+	    }
+	    // here callee is a member class
+   	    return allowAccess(caller, calleeDeclaringClass, calleeDeclaringClass, modifiers);
     }
 
     private boolean hasSameTopLevelClass(Class<?> class1, Class<?> class2) {
         Class topClass;
-        while ( (topClass = class1.getDeclaringClass()) != null) {
+        while ( (topClass = class1.getEnclosingClass()) != null) {
             class1 = topClass;
         }
-        while ( (topClass = class2.getDeclaringClass()) != null) {
+        while ( (topClass = class2.getEnclosingClass()) != null) {
             class2 = topClass;
         }
         return class1 == class2;



Mime
View raw message