Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-2441

@Deprecated does not have effect in Groovy

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.1
    • 1.6.4, 1.7-beta-1
    • None
    • None

    Description

      I have create a class in Groovy:

      public class AClass
      {
      @Deprecated public void foo()

      { System.out.println("foo"); }

      }

      I compiled it using groovyc

      groovyc AClass.groovy

      Now I created a Java class as shown below:
      class Test
      {
      public static void main(String[] args)

      { AClass obj = new AClass(); obj.foo(); }

      }

      When I compile the Java code

      javac Test.java

      I don't get any deprecation warnings.

      If I compile AClass.groovy using javac (after copying to AClass.java) and then compile Test.java using javac, I get a deprecation warning.

      Attachments

        Activity

          People

            paulk Paul King
            venkats Venkat Srinivasan
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: