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

new javac compiler: Cryptic error and misleading error messages

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.3.0
    • tools
    • generic
    • generic



      Name: krT82822 Date: 10/05/99


      If you compile the following code:

      ...
      public void testFunction(Object[] thing, Object[] anotherThing)

      and in the calling code you have:
      String[] test = {"Hello", "there"} ;
      int[] = numbers = {1,2,3} ;
      testFunction (test, numbers) ;
      The error message is VERY misleading, it talks about Array vs. Object[]
      The new format of the error messages is too complicated, the old
      style was more concise and informative (perhaps I'm just used to them).
      The new style does NOT help the debugging process.
      Also, thrid party applications that can parse JAVAC output and link
      to the relevant source code line (e.g. Kawa IDE) will have to
      be re-engineered for 1.3- thus severely harrassing the third party
      market for no benefit.


      public class Cryptique {

          // if you have a method such as:
          
          public static void testFunction(Object[] thing, Object[] anotherThing) {
          
          }

          public static void main(String[] args) {
              
              // ...and in the calling code you have:

              String[] test = new String[] {"Hello", "there"} ;
              int[] numbers = new int[] {1,2,3} ;
              
              testFunction (test, numbers) ;
          }
      }



      ------------

      10/5/99 eval1127 -- see also # 4249659
      (Review ID: 96145)
      ======================================================================

            wmaddoxsunw William Maddox (Inactive)
            kryansunw Kevin Ryan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: