[jdom-interest] JDK 1.1 support

Jason Hunter jhunter at acm.org
Mon Mar 11 17:11:56 PST 2002


While building the B8 RC, I noticed that our use of statics inside inner
classes is not supported with JDK 1.1 compilers, as shown below.  I'm
wondering, do we want to fix this for B8, or just decide that we've
supported JDK 1.1 long enough?  It's been this way in CVS for a couple
months and no one's complained.  Who would complain if we didn't support
JDK 1.1 anymore?

-jh-

compile:
    [javac] Compiling 43 source files to /tmp/jdom-b8/build/classes
    [javac] /tmp/jdom-b8/build/src/org/jdom/ContentList.java:880:
Variable CREATE can't be static in inner class org.jdom.ContentList.
FilterListIterator.  Only members of interfaces and top-level classes
can be static.
    [javac]     class FilterListIterator implements ListIterator {
    [javac]           ^
    [javac] /tmp/jdom-b8/build/src/org/jdom/ContentList.java:880:
Variable HASPREV can't be static in inner class org.jdom.ContentList.
FilterListIterator.  Only members of interfaces and top-level classes
can be static.
    [javac]     class FilterListIterator implements ListIterator {
    [javac]           ^
    [javac] /tmp/jdom-b8/build/src/org/jdom/ContentList.java:880:
Variable HASNEXT can't be static in inner class org.jdom.ContentList.
FilterListIterator.  Only members of interfaces and top-level classes
can be static.
    [javac]     class FilterListIterator implements ListIterator {
    [javac]           ^
    [javac] /tmp/jdom-b8/build/src/org/jdom/ContentList.java:880:
Variable PREV can't be static in inner class org.jdom.ContentList.
FilterListIterator.  Only members of interfaces and top-level classes
can be static.
    [javac]     class FilterListIterator implements ListIterator {
    [javac]           ^
    [javac] /tmp/jdom-b8/build/src/org/jdom/ContentList.java:880:
Variable NEXT can't be static in inner class org.jdom.ContentList.
FilterListIterator.  Only members of interfaces and top-level classes
can be static.
    [javac]     class FilterListIterator implements ListIterator {
    [javac]           ^
    [javac] /tmp/jdom-b8/build/src/org/jdom/ContentList.java:880:
Variable ADD can't be static in inner class org.jdom.ContentList.
FilterListIterator.  Only members of interfaces and top-level classes
can be static.
    [javac]     class FilterListIterator implements ListIterator {
    [javac]           ^
    [javac] /tmp/jdom-b8/build/src/org/jdom/ContentList.java:880:
Variable REMOVE can't be static in inner class org.jdom.ContentList.
FilterListIterator.  Only members of interfaces and top-level classes
can be static.
    [javac]     class FilterListIterator implements ListIterator {
    [javac]           ^
    [javac] /tmp/jdom-b8/build/src/org/jdom/ContentList.java:880:
Variable SET can't be static in inner class org.jdom.ContentList.
FilterListIterator.  Only members of interfaces and top-level classes
can be static.
    [javac]     class FilterListIterator implements ListIterator {
    [javac]           ^
    [javac]
/tmp/jdom-b8/build/src/org/jdom/output/XMLOutputter.java:217: Variable
STANDARD_INDENT can't be static in inner class
org.jdom.output.XMLOutputter. Format.  Only members of interfaces and
top-level classes can be static.
    [javac]     class Format implements Cloneable {
    [javac]           ^
    [javac]
/tmp/jdom-b8/build/src/org/jdom/output/XMLOutputter.java:217: Variable
STANDARD_LINE_SEPARATOR can't be static in inner class
org.jdom.output.XMLOutputter. Format.  Only members of interfaces and
top-level classes can be static.
    [javac]     class Format implements Cloneable {
    [javac]           ^
    [javac] /tmp/jdom-b8/build/src/org/jdom/input/SAXHandler.java:717:
Method substring(int) not found in class java.lang.StringBuffer.
    [javac]         String data = textBuffer.substring(0);
    [javac]                                           ^
    [javac]
/tmp/jdom-b8/build/src/org/jdom/output/XMLOutputter.java:530: Can't make
a static reference to nonstatic variable STANDARD_INDENT in inner class
org.jdom.output.XMLOutputter. Format.
    [javac]             defaultFormat.indent = Format.STANDARD_INDENT;
    [javac]                                          ^
    [javac] 12 errors

BUILD FAILED



More information about the jdom-interest mailing list