Browse Source

Update to use getLogger().<method>() rather than log()

Move EchoLevel inner class to top level class


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270428 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 23 years ago
parent
commit
4123acf5ed
1 changed files with 6 additions and 36 deletions
  1. +6
    -36
      proposal/myrmidon/src/java/org/apache/antlib/xml/XMLValidateTask.java

+ 6
- 36
proposal/myrmidon/src/java/org/apache/antlib/xml/XMLValidateTask.java View File

@@ -207,7 +207,7 @@ public class XMLValidateTask
{ {
if( this.classpath == null ) if( this.classpath == null )
{ {
this.classpath = new Path( getProject() );
this.classpath = new Path();
} }
return this.classpath.createPath(); return this.classpath.createPath();
} }
@@ -445,32 +445,6 @@ public class XMLValidateTask
} }
} }


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 : * ValidatorErrorHandler role :
* <ul> * <ul>
@@ -488,20 +462,19 @@ public class XMLValidateTask
// did an error happen during last parsing ? // did an error happen during last parsing ?
public boolean getFailure() public boolean getFailure()
{ {

return failed; return failed;
} }


public void error( SAXParseException exception ) public void error( SAXParseException exception )
{ {
failed = true; failed = true;
doLog( exception, Project.MSG_ERR );
getLogger().error( getMessage( exception ), exception );
} }


public void fatalError( SAXParseException exception ) public void fatalError( SAXParseException exception )
{ {
failed = true; failed = true;
doLog( exception, Project.MSG_ERR );
getLogger().error( getMessage( exception ), exception );
} }


public void init( File file ) public void init( File file )
@@ -515,7 +488,9 @@ public class XMLValidateTask
// depending on implementation, XMLReader can yield hips of warning, // depending on implementation, XMLReader can yield hips of warning,
// only output then if user explicitely asked for it // only output then if user explicitely asked for it
if( warn ) if( warn )
doLog( exception, Project.MSG_WARN );
{
getLogger().warn( getMessage( exception ), exception );
}
} }


private String getMessage( SAXParseException e ) private String getMessage( SAXParseException e )
@@ -538,11 +513,6 @@ public class XMLValidateTask
} }
return e.getMessage(); return e.getMessage();
} }

private void doLog( SAXParseException e, int logLevel )
{
log( getMessage( e ), logLevel );
}
} }


private class LocalResolver private class LocalResolver


Loading…
Cancel
Save