stevel 2005/08/22 09:51:16 Modified: src/main/org/apache/tools/ant ComponentHelper.java src/main/org/apache/tools/ant/taskdefs Definer.java Log: move to constants to define policy strings; change so that ignore loads print out something at -v level. Why so? to debug antlib namespace declarations. Revision Changes Path 1.59 +1 -1 ant/src/main/org/apache/tools/ant/ComponentHelper.java Index: ComponentHelper.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/ComponentHelper.java,v retrieving revision 1.58 retrieving revision 1.59 diff -u -r1.58 -r1.59 --- ComponentHelper.java 13 Aug 2005 15:15:23 -0000 1.58 +++ ComponentHelper.java 22 Aug 2005 16:51:16 -0000 1.59 @@ -781,7 +781,7 @@ uri.substring(ANTLIB_PREFIX.length()).replace('.', '/') + "/antlib.xml"); // a fishing expedition :- ignore errors if antlib not present - definer.setOnError(new Typedef.OnError("ignore")); + definer.setOnError(new Typedef.OnError(Typedef.OnError.POLICY_IGNORE)); definer.init(); definer.execute(); } 1.57 +25 -3 ant/src/main/org/apache/tools/ant/taskdefs/Definer.java Index: Definer.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Definer.java,v retrieving revision 1.56 retrieving revision 1.57 diff -u -r1.56 -r1.57 --- Definer.java 12 Nov 2004 15:14:59 -0000 1.56 +++ Definer.java 22 Aug 2005 16:51:16 -0000 1.57 @@ -41,6 +41,7 @@ * handling is handled by DefBase * * @since Ant 1.4 + * @noinspection ParameterHidesMemberVariable */ public abstract class Definer extends DefBase { private static class ResourceStack extends ThreadLocal { @@ -74,6 +75,24 @@ public static class OnError extends EnumeratedAttribute { /** Enumerated values */ public static final int FAIL = 0, REPORT = 1, IGNORE = 2, FAIL_ALL = 3; + + /** + * text value of onerror option [EMAIL PROTECTED] + */ + public static final String POLICY_FAIL = "fail"; + /** + * text value of onerror option [EMAIL PROTECTED] + */ + public static final String POLICY_REPORT = "report"; + /** + * text value of onerror option [EMAIL PROTECTED] + */ + public static final String POLICY_IGNORE = "ignore"; + /** + * text value of onerror option [EMAIL PROTECTED] + */ + public static final String POLICY_FAILALL = "failall"; + /** * Constructor */ @@ -94,7 +113,7 @@ * @return an array of the allowed values for this attribute. */ public String[] getValues() { - return new String[] {"fail", "report", "ignore", "failall"}; + return new String[] {POLICY_FAIL, POLICY_REPORT, POLICY_IGNORE, POLICY_FAILALL}; } } @@ -270,7 +289,9 @@ log(message, Project.MSG_WARN); break; case OnError.IGNORE: - // Fall Through + // log at a lower level + log(message, Project.MSG_VERBOSE); + break; default: // Ignore the problem break; @@ -298,7 +319,8 @@ log(message, Project.MSG_WARN); break; case OnError.IGNORE: - // Fall Through + log(message, Project.MSG_VERBOSE); + break; default: // Ignore the problem break;
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]