Bug introduced with new process invocation methods.
processClass is not forced to be a SvrProcess class, it can be also a ReportStarter one (used with Jasper Reports) Fixed by class validation and minimal usage of reflection. Jasper Reports as well as normal processes are now both working again.
This commit is contained in:
parent
3f543ffcea
commit
608771cc21
|
@ -78,7 +78,18 @@ public final class ProcessUtil {
|
|||
ProcessCall process = null;
|
||||
try
|
||||
{
|
||||
process = (SvrProcess)processClass.newInstance ();
|
||||
if(processClass.getName().equals("org.compiere.report.ReportStarter"))
|
||||
{
|
||||
Class clazz = Class.forName("org.compiere.report.ReportStarter");
|
||||
Object processObj = processClass.newInstance();
|
||||
process = (ProcessCall)clazz.cast(processObj);
|
||||
}
|
||||
else
|
||||
{
|
||||
Class clazz = Class.forName("org.compiere.process.SvrProcess");
|
||||
Object processObj = processClass.newInstance();
|
||||
process = (ProcessCall)clazz.cast(processObj);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue