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

Inconsistent output for Visible and InvisibleParameterAnnotations

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 10
    • 9
    • tools
    • None
    • b01

        To reproduce compile following sample and run javap -v Sample.class

        In Visible annotation case there is word "parameter". Invisible annotation doesn't have such word in output.
        RuntimeVisibleParameterAnnotations:
              parameter 0:
              parameter 1:
                0: #22()
            RuntimeInvisibleParameterAnnotations:
              0:
                0: #24()
              1:

        ///
        import java.lang.annotation.Retention;
        import java.lang.annotation.RetentionPolicy;

        public class Sample {

            @Retention(RetentionPolicy.CLASS)
            public @interface InvisAnno{}
            @Retention(RetentionPolicy.RUNTIME)
            public @interface VisAnno{}

            public void Method(@InvisAnno int arg1,@VisAnno int arg2){};
        }

              jjg Jonathan Gibbons
              anazarov Andrey Nazarov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: