*** JavaAccessibility.java Tue Feb 20 16:17:27 2001 --- ../org/python/core/JavaAccessibility.java Fri Feb 2 00:41:10 2001 *************** *** 16,35 **** private static JavaAccessibility access = null; static void initialize() { ! // If we can find it, and the registry option ! // python.security.respectJavaAccessibility is set, then we set the ! // access object to an instance of the subclass Java2Accessibility ! if (Options.respectJavaAccessibility && Options.matchJavaAccess==false) { return; ! } ! try { Class c = Class.forName("org.python.core.Java2Accessibility"); Class.forName("java.lang.reflect.AccessibleObject"); access = (JavaAccessibility)c.newInstance(); } ! catch (InstantiationException e) {} ! catch (IllegalAccessException e) {} ! catch (ClassNotFoundException e) {} } static boolean accessIsMutable() { --- 16,34 ---- private static JavaAccessibility access = null; static void initialize() { ! // If we can find it, and the registry option ! // python.security.respectJavaAccessibility is set, then we set the ! // access object to an instance of the subclass Java2Accessibility ! if (Options.respectJavaAccessibility) return; ! try { Class c = Class.forName("org.python.core.Java2Accessibility"); Class.forName("java.lang.reflect.AccessibleObject"); access = (JavaAccessibility)c.newInstance(); } ! catch (InstantiationException e) {} ! catch (IllegalAccessException e) {} ! catch (ClassNotFoundException e) {} } static boolean accessIsMutable() { *************** *** 39,76 **** /** * These methods get overridden in the Java2Accessibility subclass */ - void setAccess(Field field, boolean flag) throws SecurityException { } void setAccess(Method method, boolean flag) throws SecurityException { } ! void setAccess(Constructor constructor, boolean flag) throws SecurityException { ! } ! public static boolean matchJavaAccess() { ! if(access == null) return false; ! return Options.matchJavaAccess; ! } public static void setAccessible(Field field, boolean flag) throws SecurityException { ! if (access != null) ! access.setAccess(field, flag); } public static void setAccessible(Method method, boolean flag) throws SecurityException { ! if (access != null) ! access.setAccess(method, flag); } public static void setAccessible(Constructor constructor, boolean flag) throws SecurityException { ! if (access != null) ! access.setAccess(constructor, flag); } - } --- 38,71 ---- /** * These methods get overridden in the Java2Accessibility subclass */ void setAccess(Field field, boolean flag) throws SecurityException { } void setAccess(Method method, boolean flag) throws SecurityException { } ! void setAccess(Constructor constructor, boolean flag) ! throws SecurityException ! {} ! public static void setAccessible(Field field, boolean flag) throws SecurityException { ! if (access != null) ! access.setAccess(field, flag); } public static void setAccessible(Method method, boolean flag) throws SecurityException { ! if (access != null) ! access.setAccess(method, flag); } public static void setAccessible(Constructor constructor, boolean flag) throws SecurityException { ! if (access != null) ! access.setAccess(constructor, flag); } } *** Options.java Tue Feb 20 16:03:49 2001 --- ../org/python/core/Options.java Fri Feb 2 00:41:10 2001 *************** *** 1,4 **** ! // Copyright ¨ Corporation for National Research Initiatives package org.python.core; public class Options --- 1,4 ---- ! // Copyright © Corporation for National Research Initiatives package org.python.core; public class Options *************** *** 41,47 **** // have unintended side-effects. This option is temporary. public static boolean extendedClassLoader = true; */ ! public static boolean matchJavaAccess = false; // TBD public static boolean importSite = true; --- 41,47 ---- // have unintended side-effects. This option is temporary. public static boolean extendedClassLoader = true; */ ! // TBD public static boolean importSite = true; *************** *** 60,67 **** // // ####### END OF OPTIONS // ! ! private static boolean getBooleanOption(String name, boolean defaultValue) { String prop = PySystemState.registry.getProperty("python."+name); --- 60,66 ---- // // ####### END OF OPTIONS // ! private static boolean getBooleanOption(String name, boolean defaultValue) { String prop = PySystemState.registry.getProperty("python."+name); *************** *** 108,116 **** Options.proxyDebugDirectory = getStringOption("options.proxyDebugDirectory", Options.proxyDebugDirectory); ! Options.matchJavaAccess = ! getBooleanOption("security.matchJavaAccess", ! Options.matchJavaAccess); // verbosity is more complicated: String prop = PySystemState.registry.getProperty("python.verbose"); if (prop != null) { --- 107,113 ---- Options.proxyDebugDirectory = getStringOption("options.proxyDebugDirectory", Options.proxyDebugDirectory); ! // verbosity is more complicated: String prop = PySystemState.registry.getProperty("python.verbose"); if (prop != null) { *** PyClass.java Tue Feb 20 16:26:37 2001 --- ../org/python/core/PyClass.java Thu Feb 15 06:17:54 2001 *************** *** 151,162 **** if (result == null && __bases__ != null) { int n = __bases__.__len__(); for (int i=0; i