Skip to content

Commit

Permalink
Cleanup pass
Browse files Browse the repository at this point in the history
  • Loading branch information
Thrameos committed Nov 29, 2024
1 parent 9b15bd8 commit 3a5d118
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 45 deletions.
2 changes: 1 addition & 1 deletion jpype/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'),

Check warning on line 174 in jpype/_core.py

View check run for this annotation

Codecov / codecov/patch

jpype/_core.py#L169-L174

Added lines #L169 - L174 were not covered by tests
os.path.expandvars(r'%SYSTEMROOT%\Temp'),
r'c:\temp', r'c:\tmp', r'\temp', r'\tmp' ]:
if dirname and dirname.isascii():
Expand Down
1 change: 0 additions & 1 deletion native/java/manifest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
31 changes: 1 addition & 30 deletions native/java/org/jpype/JPypeContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down
11 changes: 0 additions & 11 deletions native/java/org/jpype/agent/JPypeAgent.java

This file was deleted.

3 changes: 1 addition & 2 deletions test/jpypetest/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 3a5d118

Please sign in to comment.