JDK-4261227 : -nowarn option does not work in new javac
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 1.3.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_nt
  • CPU: x86
  • Submitted: 1999-08-10
  • Updated: 1999-09-04
  • Resolved: 1999-09-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.3.0 kestrelFixed
Related Reports
Relates :  
Description
The -nowarn flag does not switch off warnings 
in the new javac compiler. Tested win32 build
of JDK1_3 build "L" 23 July.

The following will generated a "deprecated method warning"

public class Test extends Thread {
        public static void main (String args[])
        {
                Test t = new Test ();
                t.start ();
        }
        public void run ()
        {
                stop (); // WARNING
        }
}

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: kestrel FIXED IN: kestrel INTEGRATED IN: kestrel
14-06-2004

EVALUATION I'm going to guess that we're not properly recording the fact that "-nowarn" was selected or that there's a particular warning that is somehow not being catagorized as a warning?! I would appreciate getting a small, reproducible test case to help me track this one down. iris.garcia@eng 1999-08-10 Internally, the deprecation message is treated as a notification, not a warning. Thus, the "-nowarn" option has no effect. Because of the different classification, the behaviour exhibited by the new compiler is not consistent with previous releases. (iag@ribbit) ~/work/bug/c $ jdk118 (iag@ribbit) ~/work/bug/c $ javac -nowarn Test.java (iag@ribbit) ~/work/bug/c $ jdk122 (iag@ribbit) ~/work/bug/c $ javac -nowarn Test.java (iag@ribbit) ~/work/bug/c $ jdk13 (iag@ribbit) ~/work/bug/c $ javac -nowarn Test.java Note: Test.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. iris.garcia@eng 1999-08-17 All "notes" are now printed out when warnings are emitted. Since there are very few notes in the compiler at this time, we are determining whether these messages should be printed based on the value of Log.emitWarnings. If we should ever expand on the use of "note" we may want to re-evaluate this decision. iris.garcia@eng 1999-08-27
27-08-1999