donaldp 01/12/29 16:26:06
Modified: proposal/myrmidon/src/java/org/apache/antlib/xml
XMLValidateTask.java
Log:
Update to use getLogger().<method>() rather than log()
Move EchoLevel inner class to top level class
Revision Changes Path
1.6 +6 -36
jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/xml/XMLValidateTask.java
Index: XMLValidateTask.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/xml/XMLValidateTask.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- XMLValidateTask.java 23 Dec 2001 14:25:02 -0000 1.5
+++ XMLValidateTask.java 30 Dec 2001 00:26:06 -0000 1.6
@@ -207,7 +207,7 @@
{
if( this.classpath == null )
{
- this.classpath = new Path( getProject() );
+ this.classpath = new Path();
}
return this.classpath.createPath();
}
@@ -445,32 +445,6 @@
}
}
- public static class DTDLocation
- {
- private String publicId = null;
- private String location = null;
-
- public void setLocation( String location )
- {
- this.location = location;
- }
-
- public void setPublicId( String publicId )
- {
- this.publicId = publicId;
- }
-
- public String getLocation()
- {
- return location;
- }
-
- public String getPublicId()
- {
- return publicId;
- }
- }
-
/*
* ValidatorErrorHandler role :
* <ul>
@@ -488,20 +462,19 @@
// did an error happen during last parsing ?
public boolean getFailure()
{
-
return failed;
}
public void error( SAXParseException exception )
{
failed = true;
- doLog( exception, Project.MSG_ERR );
+ getLogger().error( getMessage( exception ), exception );
}
public void fatalError( SAXParseException exception )
{
failed = true;
- doLog( exception, Project.MSG_ERR );
+ getLogger().error( getMessage( exception ), exception );
}
public void init( File file )
@@ -515,7 +488,9 @@
// depending on implementation, XMLReader can yield hips of
warning,
// only output then if user explicitely asked for it
if( warn )
- doLog( exception, Project.MSG_WARN );
+ {
+ getLogger().warn( getMessage( exception ), exception );
+ }
}
private String getMessage( SAXParseException e )
@@ -537,11 +512,6 @@
}
}
return e.getMessage();
- }
-
- private void doLog( SAXParseException e, int logLevel )
- {
- log( getMessage( e ), logLevel );
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>