classpathx-xml
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Classpathx-xml] Re: Strange exception when running checkstyle


From: Mark Wielaard
Subject: [Classpathx-xml] Re: Strange exception when running checkstyle
Date: Tue, 28 Dec 2004 09:16:58 +0100

Hi,

On Tue, 2004-12-28 at 00:30 +0100, Michael Koch wrote:
> I tried to run checkstyle with jamvm-1.2.3/classpath-cvs. I get the 
> following exception:
> 
> Error loading configuration file
> com.puppycrawl.tools.checkstyle.api.CheckstyleException: unable to 
> parse scripts/checkstyle-config.xml - No base URI; hope URI is 
> absolute: 
> http://members.iinet.net.au/~oburn/dtds/configuration_1_2.dtd:4:64

On irc we debugged this a little more. The main problem is that
checkstyle has a ErrorHandler that just throws the exception when it
gets a warnings. So on the one hand it does get what it asks for. On the
other hand the warnings are a bit pedantic since in this case the URI is
absolute it seems.

Removing these two warnings made Checkstyle work just fine:

In SAXDriver.java (648)
            if (baseURI == null) {
                warn ("No base URI; hope this SYSTEM id is absolute: "
                        + systemId);
                return new URL (systemId).toString ();

In XmlParser.java (2811)
            if (ids [2] == null)
                handler.warn ("No base URI; hope URI is absolute: "
                        + ids [1]);

It seems to make sense to actually test whether the System id or base
URI is actually a absolute URI and then not emit the warning.

Cheers,

Mark

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]