Browse Source

Ignore NoSuchMethod exceptions when looking for setProject in non

Task classes being used as tasks


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269783 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 24 years ago
parent
commit
1be070bb5a
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      src/main/org/apache/tools/ant/TaskAdapter.java

+ 3
- 0
src/main/org/apache/tools/ant/TaskAdapter.java View File

@@ -79,6 +79,9 @@ public class TaskAdapter extends Task {
if(setProjectM != null) { if(setProjectM != null) {
setProjectM.invoke(proxy, new Object[] {project}); setProjectM.invoke(proxy, new Object[] {project});
} }
} catch (NoSuchMethodException e) {
// ignore this if the class being used as a task does not have
// a set project method.
} catch( Exception ex ) { } catch( Exception ex ) {
log("Error setting project in " + proxy.getClass(), log("Error setting project in " + proxy.getClass(),
Project.MSG_ERR); Project.MSG_ERR);


Loading…
Cancel
Save