Skip to content

Commit

Permalink
Test using isAssignableFrom instead of by class
Browse files Browse the repository at this point in the history
This will handle ExtendedBioclipseJob too. I can not run tests on my machine but this should-be-safe™. Fixes bug: #1659
  • Loading branch information
jonalv committed Oct 20, 2009
1 parent e743091 commit deddc5e
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -99,8 +99,10 @@ public Object invoke( MethodInvocation invocation ) throws Throwable {
}

Object returnValue;
if ( (invocation.getMethod().getReturnType() != BioclipseJob.class &&
invocation.getMethod().getReturnType() != void.class)
if ( ( !BioclipseJob.class
.isAssignableFrom( invocation.getMethod()
.getReturnType() )
&& invocation.getMethod().getReturnType() != void.class )
|| Arrays.asList( invocation.getMethod().getParameterTypes() )
.contains( IProgressMonitor.class ) ) {
if ( Arrays.asList( m.getParameterTypes() )
Expand Down

0 comments on commit deddc5e

Please sign in to comment.