ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant ComponentHelper.java
Date Mon, 16 May 2005 12:11:44 GMT
stevel      2005/05/16 05:11:44

  Modified:    src/main/org/apache/tools/ant ComponentHelper.java
  Log:
  merged antlib: strings to a single (currently private) constant.
  
  Revision  Changes    Path
  1.54      +3 -2      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.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- ComponentHelper.java	5 May 2005 15:57:19 -0000	1.53
  +++ ComponentHelper.java	16 May 2005 12:11:44 -0000	1.54
  @@ -91,6 +91,7 @@
       private static final String ERROR_NO_TASK_LIST_LOAD = "Can't load default task list";
       private static final String ERROR_NO_TYPE_LIST_LOAD = "Can't load default type list";
       public static final String COMPONENT_HELPER_REFERENCE = "ant.ComponentHelper";
  +    private static final String ANTLIB_PREFIX = "antlib:";
   
       /**
        * Find a project component for a specific project, creating
  @@ -759,7 +760,7 @@
           definer.setProject(project);
           definer.setURI(uri);
           definer.setResource(
  -            uri.substring("antlib:".length()).replace('.', '/')
  +            uri.substring(ANTLIB_PREFIX.length()).replace('.', '/')
               + "/antlib.xml");
           // a fishing expedition :- ignore errors if antlib not present
           definer.setOnError(new Typedef.OnError("ignore"));
  @@ -791,7 +792,7 @@
           AntTypeDefinition def = getDefinition(componentName);
           if (def == null) {
               //not a known type
  -            boolean isAntlib=componentName.indexOf("antlib:")==0;
  +            boolean isAntlib=componentName.indexOf(ANTLIB_PREFIX)==0;
               out.println("Cause: The name is undefined.");
               out.println("Action: Check the spelling.");
               out.println("Action: Check that any custom tasks/types have been declared");
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message