diff --git a/jpype/_core.py b/jpype/_core.py index f58ddb1dd..7a2ff30d2 100644 --- a/jpype/_core.py +++ b/jpype/_core.py @@ -171,7 +171,7 @@ def _findTemp(): if dirname and dirname.isascii(): dirlist.append(dirname) if os.name == 'nt': - for envname in [ os.path.expanduser(r'~\AppData\Local\Temp'), + for dirname in [ os.path.expanduser(r'~\AppData\Local\Temp'), os.path.expandvars(r'%SYSTEMROOT%\Temp'), r'c:\temp', r'c:\tmp', r'\temp', r'\tmp' ]: if dirname and dirname.isascii(): diff --git a/native/java/manifest.txt b/native/java/manifest.txt index cc3a0089c..fa49425d5 100644 --- a/native/java/manifest.txt +++ b/native/java/manifest.txt @@ -2,4 +2,3 @@ Manifest-Version: 1.0 Specification-Title: org.jpype Implementation-Title: org.jpype Implementation-Version: 1.5.1 -Premain-Class: org.jpype.agent.JPypeAgent diff --git a/native/java/org/jpype/JPypeContext.java b/native/java/org/jpype/JPypeContext.java index d4fcc00be..40c93fd06 100644 --- a/native/java/org/jpype/JPypeContext.java +++ b/native/java/org/jpype/JPypeContext.java @@ -27,8 +27,6 @@ import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; -import java.util.logging.Level; -import java.util.logging.Logger; import org.jpype.manager.TypeFactory; import org.jpype.manager.TypeFactoryNative; import org.jpype.manager.TypeManager; @@ -73,7 +71,7 @@ public class JPypeContext public final String VERSION = "1.5.2.dev0"; - private static JPypeContext INSTANCE = new JPypeContext(); + private static final JPypeContext INSTANCE = new JPypeContext(); // This is the C++ portion of the context. private long context; private TypeFactory typeFactory; @@ -333,33 +331,6 @@ public void _addPost(Runnable run) { this.postHooks.add(run); } - - /** - * Call a method using reflection. - * - * This method creates a stackframe so that caller sensitive methods will - * execute properly. - * - * @param method is the method to call. - * @param obj is the object to operate on, it will be null if the method is - * static. - * @param args the arguments to method. - * @return the object that results form the invocation. - * @throws java.lang.Throwable throws whatever type the called method - * produces. - */ - public Object callMethod(Method method, Object obj, Object[] args) - throws Throwable - { - try - { - return method.invoke(obj, args); - } catch (InvocationTargetException ex) - { -// ex.printStackTrace(); - throw ex.getCause(); - } - } /** * Helper function for collect rectangular, diff --git a/native/java/org/jpype/agent/JPypeAgent.java b/native/java/org/jpype/agent/JPypeAgent.java deleted file mode 100644 index c15ac7334..000000000 --- a/native/java/org/jpype/agent/JPypeAgent.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.jpype.agent; - -import java.lang.instrument.Instrumentation; - -public class JPypeAgent -{ - public static void premain(String agentArgs, Instrumentation inst) { - // This doesn't have to do anything. - // We just need to be an agent to load elevated privileges - } -} diff --git a/test/jpypetest/common.py b/test/jpypetest/common.py index 9d3d9764d..8494ff568 100644 --- a/test/jpypetest/common.py +++ b/test/jpypetest/common.py @@ -74,8 +74,7 @@ def f(self): if root.isascii(): return func(self) except ImportError: - pass - raise unittest.SkipTest("Ascii root directory required") + raise unittest.SkipTest("Ascii root directory required") return f class UseFunc(object):