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

Deprecated warnings are not given if the class containing the tag is compiled at

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.4.0
    • tools
    • x86
    • windows_2000



      Name: pa48320 Date: 08/08/2002

      If you compile a bunch on files at the same time and one containes the @deprecated tag and another uses that method, you will not get the deprecated warning. Consider the following two classes:
      package com.test;
      public class test1
      {
      /**
      * @deprecated
      */

      public void method1()
      {
      System.out.println("method1");
      }
      }

      package com.test;

      public class test2
      {

      public void method2()
      {
      test1 t = new test1();
      t.method1();

      }
      }

      Compile them using javac *.java. You get no warnings. Modify test2 and recompile just test2.java. You will get the deprecated warnings.
      ======================================================================

            gafter Neal Gafter (Inactive)
            pallenba Peter Allenbach (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: