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

Possible incorrect code in JDK sources accepted by javac

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.2.0
    • tools
    • None
    • generic
    • solaris_2.5.1

      These are alleged bogosities in the JDK source that javac incorrectly
      accepts, other than Swing stuff.



      "AbstractList.java", line 376: error: "java.util.List" is not an enclosing class
                      List.this.remove(lastRet);
                      ^
       
      "AbstractList.java", line 430: error: "java.util.List" is not an enclosing class
                      List.this.set(lastRet, o);
                      ^
       
      "AbstractList.java", line 443: error: "java.util.List" is not an enclosing class
                      List.this.add(cursor, o);
                      ^
       
      3 errors detected in this compilation.
      "AbstractMap.java", line 343: error: "java.util.Map" is not an enclosing class
                          return Map.this.size();
                                 ^
       
      "AbstractMap.java", line 347: error: "java.util.Map" is not an enclosing class
                          return Map.this.containsKey(k);
                                 ^
       
      "AbstractMap.java", line 399: error: "java.util.Map" is not an enclosing class
                          return Map.this.size();
                                 ^
       
      "AbstractMap.java", line 403: error: "java.util.Map" is not an enclosing class
                          return Map.this.containsValue(v);
                                 ^
       
      4 errors detected in this compilation.
      "AlphaCompositeContextCLEAR.java", line 52: error: class or interface "Tile"
                is undefined
          public void compose(Tile src,
                              ^
       
      "AlphaCompositeContextCLEAR.java", line 28: error: class
                "java.awt.AlphaCompositeContextCLEAR" is not declared abstract but
                does not define method "void compose(java.awt.image.Raster,
                java.awt.image.Raster, java.awt.image.WritableRaster)" in interface
                "java.awt.CompositeContext"
      class AlphaCompositeContextCLEAR implements CompositeContext {
            ^
       
      2 errors detected in this compilation.
      "AttributedCharacterIterator.java", line 161: warning: extra ";" is nonstandard
          };
           ^
       
      "AttributedCharacterIterator.java", line 132: error: statement is unreachable
                  };
                   ^
       
      1 error detected in this compilation.
      "MessageDigest.java", line 440: error: variable
                "java.security.MessageDigest.algorithm" cannot be referenced using a
                simple name -- it is inherited in class
                "java.security.MessageDigest.Delegate" and hides variable
                "java.security.MessageDigest.algorithm", which is declared in an
                enclosing scope
                      Delegate that = new Delegate(digestSpiClone, algorithm);
                                                                   ^
       
      "MessageDigest.java", line 441: error: variable
                "java.security.MessageDigest.provider" cannot be referenced using a
                simple name -- it is inherited in class
                "java.security.MessageDigest.Delegate" and hides variable
                "java.security.MessageDigest.provider", which is declared in an
                enclosing scope
                      that.provider = provider;
                                      ^
       
      "MessageDigest.java", line 442: error: variable
                "java.security.MessageDigest.state" cannot be referenced using a
                simple name -- it is inherited in class
                "java.security.MessageDigest.Delegate" and hides variable
                "java.security.MessageDigest.state", which is declared in an
                enclosing scope
                      that.state = state;
                                   ^
       
      3 errors detected in this compilation.
      "Signature.java", line 605: error: variable
                "java.security.Signature.algorithm" cannot be referenced using a
                simple name -- it is inherited in class
                "java.security.Signature.Delegate" and hides variable
                "java.security.Signature.algorithm", which is declared in an
                enclosing scope
                      Delegate that = new Delegate(sigSpiClone, algorithm);
                                                                ^
       
      "Signature.java", line 606: error: variable "java.security.Signature.provider"
                cannot be referenced using a simple name -- it is inherited in class
                "java.security.Signature.Delegate" and hides variable
                "java.security.Signature.provider", which is declared in an
                enclosing scope
                      that.provider = provider;
                                      ^
       
      2 errors detected in this compilation.
      "TextAttribute.java", line 117: error: statement is unreachable
              };
               ^
       
      1 error detected in this compilation.
      "TreeMap.java", line 724: error: interface "java.util.Map.Entry" cannot be
                referenced using a simple name -- it is inherited in class
                "java.util.TreeMap.SubMap" and hides class
                "java.util.TreeMap.Entry", which is declared in an enclosing scope
                      Entry node = getEntry(key);
                      ^
       
      "TreeMap.java", line 736: error: interface "java.util.Map.Entry" cannot be
                referenced using a simple name -- it is inherited in class
                "java.util.TreeMap.SubMap" and hides class
                "java.util.TreeMap.Entry", which is declared in an enclosing scope
                      Entry node = getEntry(key);
                      ^
       
      "TreeMap.java", line 738: error: an argument of type "java.util.Map.Entry" is
                incompatible with a parameter of type "java.util.TreeMap.Entry"
                          deleteEntry(node);
                                      ^
       
      3 errors detected in this compilation.
       

            tturnidgsunw Todd Turnidge (Inactive)
            dstoutamsunw David Stoutamire (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: