File tree 3 files changed +5
-5
lines changed
src/main/org/apache/tools/ant
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -824,7 +824,7 @@ private synchronized void checkNamespace(String componentName) {
824
824
if (uri .isEmpty ()) {
825
825
uri = ProjectHelper .ANT_CORE_URI ;
826
826
}
827
- if (!uri .startsWith (ProjectHelper . ANTLIB_URI )) {
827
+ if (!uri .startsWith (MagicNames . ANTLIB_PREFIX )) {
828
828
return ; // namespace that does not contain antlib
829
829
}
830
830
if (checkedNamespaces .contains (uri )) {
Original file line number Diff line number Diff line change 38
38
*/
39
39
public class ProjectHelper {
40
40
/** The URI for ant name space */
41
- public static final String ANT_CORE_URI = "antlib: org.apache.tools.ant" ;
41
+ public static final String ANT_CORE_URI = MagicNames . ANTLIB_PREFIX + " org.apache.tools.ant" ;
42
42
43
43
/** The URI for antlib current definitions */
44
44
public static final String ANT_CURRENT_URI = "ant:current" ;
@@ -49,7 +49,7 @@ public class ProjectHelper {
49
49
public static final String ANT_ATTRIBUTE_URI = "ant:attribute" ;
50
50
51
51
/** The URI for defined types/tasks - the format is antlib:<package> */
52
- public static final String ANTLIB_URI = "antlib:" ;
52
+ public static final String ANTLIB_URI = MagicNames . ANTLIB_PREFIX ;
53
53
54
54
/** Polymorphic attribute */
55
55
public static final String ANT_TYPE = "ant-type" ;
Original file line number Diff line number Diff line change @@ -463,12 +463,12 @@ public void setAntlib(String antlib) {
463
463
if (definerSet ) {
464
464
tooManyDefinitions ();
465
465
}
466
- if (!antlib .startsWith ("antlib:" )) {
466
+ if (!antlib .startsWith (MagicNames . ANTLIB_PREFIX )) {
467
467
throw new BuildException (
468
468
"Invalid antlib attribute - it must start with antlib:" );
469
469
}
470
470
setURI (antlib );
471
- this .resource = antlib .substring ("antlib:" .length ()).replace ('.' , '/' )
471
+ this .resource = antlib .substring (MagicNames . ANTLIB_PREFIX .length ()).replace ('.' , '/' )
472
472
+ "/antlib.xml" ;
473
473
definerSet = true ;
474
474
}
You can’t perform that action at this time.
0 commit comments