Make sure we can access the method before calling it.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1119 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: TaskMaster.java,v 1.5 2001/08/11 22:43:29 mdb Exp $
|
// $Id: TaskMaster.java,v 1.6 2003/05/04 23:35:03 mdb Exp $
|
||||||
//
|
//
|
||||||
// samskivert library - useful routines for java programs
|
// samskivert library - useful routines for java programs
|
||||||
// Copyright (C) 2001 Michael Bayne
|
// Copyright (C) 2001 Michael Bayne
|
||||||
@@ -172,6 +172,7 @@ public class TaskMaster
|
|||||||
{
|
{
|
||||||
// look up the named method on the source object and invoke it
|
// look up the named method on the source object and invoke it
|
||||||
Method meth = _source.getClass().getMethod(_name, null);
|
Method meth = _source.getClass().getMethod(_name, null);
|
||||||
|
meth.setAccessible(true);
|
||||||
return meth.invoke(_source, null);
|
return meth.invoke(_source, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user