bug-classpath
[Top][All Lists]
Advanced

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

[Bug classpath/23342] New: [XML] IllegalStateException in org.xml.sax.he


From: WBaer at gmx dot de
Subject: [Bug classpath/23342] New: [XML] IllegalStateException in org.xml.sax.helpers.NamespaceSupport
Date: 11 Aug 2005 20:51:46 -0000

Hi,

this bug is exposed by the avalon-framework testsuite with the test
org.apache.avalon.framework.configuration.test.DefaultConfigurationBuilderTestCase

java.lang.IllegalStateException: can't declare any more prefixes in this context
at org.xml.sax.helpers.NamespaceSupport$Context.declarePrefix
(NamespaceSupport.java:598)

Running this testcase not with our internal gnu.xml support but with the
xerces parser in the bootclasspath shows this error *also* !

So it seems this error is in the NamespaceSupport class:

void declarePrefix (String prefix, String uri)
{
                // Lazy processing...
    if (!declsOK)
        throw new IllegalStateException (
            "can't declare any more prefixes in this context");
    if (!declSeen) {
        copyTables();
    }
    if (declarations == null) {
        declarations = new Vector();
    }    
    prefix = prefix.intern();
    uri = uri.intern();
    if ("".equals(prefix)) {
        if ("".equals(uri)) {
            defaultNS = null;
        } else {
            defaultNS = uri;
        }
    } else {
        prefixTable.put(prefix, uri);
        uriTable.put(uri, prefix); // may wipe out another prefix
    }
    declarations.addElement(prefix);
}

>From the fact that this error appears also with Xerces and at least
JDK 1.5 includes Xerces and passes this testcase I assume that
SUN changed the implementation of the above method to remove the

 if (!declsOK)
        throw new IllegalStateException (
            "can't declare any more prefixes in this context");

test. Also I thought they use the same classes from the SAX project.
But who knows. Removing it from our implementation lets the testcase pass.
However I don't know if this makes problems elsewhere ?

Wolfgang

-- 
           Summary: [XML] IllegalStateException in
                    org.xml.sax.helpers.NamespaceSupport
           Product: classpath
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: classpath
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: WBaer at gmx dot de
                CC: bug-classpath at gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23342




reply via email to

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