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

javac is confused and confusing about warnings vs. errors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.2.0
    • tools
    • generic
    • generic



      Name: vi73552 Date: 03/23/99


      The Java compiler now issues lots of warning messages without
      distinguishing them from errors. So you waste a lot of time
      trying to workaround things that used to work and in fact still
      do work!

      The only way to tell is by inference from the count of errors
      and warnings at the end of the compiler's output. That's
      impractical when the compiler swamps you with warnings.

      If you try to infer by checking the date on the .class file,
      you'll get fooled because even when the compiler issues an error,
      it can change the date on the existing .class file. So for all
      you know, the compiler treated that error as a warning!

      Here's an example warning that I thought was an error:

      StreamCImpl.java:22: interface placeware.media.StreamClient is defined in
      StreamRPC.java. Because it is used outside of its source file, it should be
      defined in a file called "StreamClient.java".
      implements StreamClient, StreamC
                 ^

      Really, we ought to be able to turn off this particular, dubious
      message. Our RPC mechanism inherently uses a source format that
      these messages complain about.



      Here's an example message that's clearly a warning because it
      starts with "Note:"

      Note: 3 files use or override a deprecated API. Recompile with "-deprecation" for details.


      java full version "JDK1.1.6N"
      (Review ID: 55494)
      ======================================================================

            wmaddoxsunw William Maddox (Inactive)
            vasya Vassili Igouchkine (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: