Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4356294

"assert" is no longer a legal Java identifier

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.4.0
    • tools
    • None
    • sparc
    • solaris_7



      Name: ss24420 Date: 07/25/2000


      Due to the new assertion facility (see bugid 4290640), "assert"
      is no longer a legal Java indentifier. Currently the only ill
      effect is that existing source files containing a method named
      "assert" generate compiler warning messages, but we don't want
      the build to generate any new warnings.

      Here the warnings from compiling the compiler (warnings from AWT files
      are listed in bugid 4356275, and warnings from sun/misc/ProxyGenerator.java
      are listed in bugid 4356290):

      ../../../../../build/sparc/gensrc/com/sun/tools/javac/v8/util/Base.java:24: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
          public static void assert(boolean c) {

      ../../../../../build/sparc/gensrc/com/sun/tools/javac/v8/util/Base.java:34: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
          public static void assert(boolean c, Object info) {

      ../../../../../build/sparc/gensrc/com/sun/tools/javac/v8/util/Bits.java:65: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
                  Util.assert(x >= 0);

      ../../../../../build/sparc/gensrc/com/sun/tools/javac/v8/util/Bits.java:84: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
                  Util.assert(x >= 0);

      ../../../../../build/sparc/gensrc/com/sun/tools/javac/v8/util/Util.java:23: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
          public static void assert(boolean c) {

      ../../../../../build/sparc/gensrc/com/sun/tools/javac/v8/util/Util.java:33: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
          public static void assert(boolean c, Object info) {

      ../../../../../build/sparc/gensrc/com/sun/tools/javac/v8/code/ClassReader.java:801: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
              Util.assert(fieldCount == nextChar());

      ../../../../../build/sparc/gensrc/com/sun/tools/javac/v8/code/ClassReader.java:804: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
              Util.assert(methodCount == nextChar());

      ../../../../../build/sparc/gensrc/com/sun/tools/javac/v8/code/ClassWriter.java:264: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
                  Util.assert(sigbuf.length == 0);

      ../../../../../build/sparc/gensrc/com/sun/tools/javac/v8/code/ClassWriter.java:297: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
                      Util.assert(value != null);

      ../../../../../build/sparc/gensrc/com/sun/tools/javac/v8/code/Code.java:361: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
                          Util.assert(stacksize == 0);

      ../../../../../build/sparc/gensrc/com/sun/tools/javac/v8/code/Code.java:365: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
                          Util.assert(stacksize >= 0);

      ../../../../../build/sparc/gensrc/com/sun/tools/javac/v8/code/Code.java:595: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
                      Util.assert(target > chain.pc || stacksize == 0);

      ../../../../../build/sparc/gensrc/com/sun/tools/javac/v8/code/Code.java:617: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
                          Util.assert(!alive || chain.stacksize == stacksize);

      ../../../../../build/sparc/gensrc/com/sun/tools/javac/v8/code/Type.java:73: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
                  Util.assert(tag <= BOOLEAN);

      ../../../../../build/sparc/gensrc/com/sun/tools/javac/v8/parser/Parser.java:538: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
                  Util.assert(top == 0);

      ../../../../../build/sparc/gensrc/com/sun/tools/javac/v8/comp/Gen.java:217: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
                          Util.assert(((Gen.GenContext) env.info).gaps.length() % 2 == 0);

      ../../../../../build/sparc/gensrc/com/sun/tools/javac/v8/comp/Gen.java:508: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
                      Util.assert(code.stacksize == 0);

      ../../../../../build/sparc/gensrc/com/sun/tools/javac/v8/comp/Gen.java:629: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
                              Util.assert(defaultIndex == -1);

      ../../../../../build/sparc/gensrc/com/sun/tools/javac/v8/comp/Gen.java:989: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
                  Util.assert(tree.encl == null && tree.def == null);

      ../../../../../build/sparc/gensrc/com/sun/tools/javac/v8/comp/Items.java:375: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
                      Util.assert(adr >= 0);

      ../../../../../build/sparc/gensrc/com/sun/tools/javac/v8/comp/TransInner.java:847: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
              Util.assert(cdef != null, "class def not found: " + sym + " in " + sym.owner);

      ../../../../../build/sparc/gensrc/com/sun/tools/javac/v8/comp/TransInner.java:1138: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
                  Util.assert(rhs.owner.kind == MTH);

      ../../../../../build/sparc/gensrc/com/sun/tools/javac/v8/comp/TransInner.java:1141: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
                  Util.assert(rhs.owner.owner == lhs.owner);

      ../../../../../build/sparc/gensrc/com/sun/tools/javac/v8/comp/TransInner.java:1154: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
                  Util.assert(rhs.owner.kind == MTH);

      ../../../../../build/sparc/gensrc/com/sun/tools/javac/v8/comp/TransInner.java:1157: warning: as of release 1.4, assert is a keyword, and may not be used as an identifier
                  Util.assert(rhs.owner.owner == lhs.owner);

      ======================================================================

            gafter Neal Gafter (Inactive)
            sseligmasunw Scott Seligman (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: