This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Source parser bug


Fully qualifing static methods sometimes produces an error message from
the source parser:

public class Parse
{
  public static void main(String args[])
    {
      int i = java.lang.Integer.parseInt("20");
      System.out.println(i);
    }
}

[bryce@reason tests]$ gcj -c Parse.java -o parse --main=Parse
Parse.java: In class `Parse':
Parse.java: In method `main(java.lang.String[])':
Parse.java:5: Can't search method `parseInt' in package
`java.lang.Integer'.
      int i = java.lang.Integer.parseInt("20");

Neither jikes nor javac have a problem with this code. It works fine if
the "java.lang" removed from the call.

regards

  [ bryce ]



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]