Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369902 - NoSuchMethodException when ProgressMonitor does not implement init(String[])
Summary: NoSuchMethodException when ProgressMonitor does not implement init(String[])
Status: RESOLVED FIXED
Alias: None
Product: EMFT
Classification: Modeling
Component: MWE (show other bugs)
Version: 1.1   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 trivial (vote)
Target Milestone: M5   Edit
Assignee: Karsten Thoms CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-27 03:50 EST by Karsten Thoms CLA
Modified: 2012-01-27 03:58 EST (History)
0 users

See Also:


Attachments
Sample Project (15.80 KB, application/zip)
2012-01-27 03:50 EST, Karsten Thoms CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Karsten Thoms CLA 2012-01-27 03:50:09 EST
Created attachment 210169 [details]
Sample Project

If a custom implementation of ProgressMonitor is passed, the class is searched for a method
   void init (String[])
When the method does not exist the code should safely skip invocation, but actually the code raises a NoSuchMethodException.

1    ERROR WorkflowRunner     - metamodel.MyProgressMonitor.init([Ljava.lang.String;)
java.lang.NoSuchMethodException: metamodel.MyProgressMonitor.init([Ljava.lang.String;)
	at java.lang.Class.getMethod(Class.java:1605)
	at org.eclipse.emf.mwe.core.WorkflowRunner.main(WorkflowRunner.java:205)


Actually there should be an interface ProgressMonitor2 which adds this method.
Comment 1 Karsten Thoms CLA 2012-01-27 03:51:50 EST
moved to MWE
Comment 2 Karsten Thoms CLA 2012-01-27 03:58:58 EST
Added ProgressMonitor2 interface
Changed WorkflowRunner