mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-17 05:52:26 +00:00
class might not be public even when a method can be.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@36833 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
ca61e0e181
commit
593f01332a
1 file changed
+4
-1
@@ -26,6 +26,7 @@ package hudson.model.queue;
|
||||
import hudson.model.Queue.Executable;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
/**
|
||||
* Convenience methods around {@link Executable}.
|
||||
@@ -41,7 +42,9 @@ public class Executables {
|
||||
return _getParentOf(e);
|
||||
} catch (AbstractMethodError _) {
|
||||
try {
|
||||
return (SubTask)e.getClass().getMethod("getParent").invoke(e);
|
||||
Method m = e.getClass().getMethod("getParent");
|
||||
m.setAccessible(true);
|
||||
return (SubTask) m.invoke(e);
|
||||
} catch (IllegalAccessException x) {
|
||||
throw (Error)new IllegalAccessError().initCause(x);
|
||||
} catch (NoSuchMethodException x) {
|
||||
|
||||
Reference in new issue
Block a user