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

javac unexpectedly doesn't fail in some cases if an annotation processor specified

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        The javac doesn't fail while processing the attached negative JCK lang tests if an annotation processor is specified. Consider steps to reproduce the problem using the simple annotation processor below.

        ===DummyProcessor.java===
        import javax.annotation.processing.AbstractProcessor;
        import javax.lang.model.element.TypeElement;
        import javax.annotation.processing.RoundEnvironment;
        import javax.annotation.processing.SupportedAnnotationTypes;
        import javax.annotation.processing.SupportedSourceVersion;
        import java.util.Set;
        import javax.lang.model.SourceVersion;

        @SupportedSourceVersion(SourceVersion.RELEASE_6)
        @SupportedAnnotationTypes("*")
        public class DummyProcessor extends AbstractProcessor {

            public boolean process(Set<? extends TypeElement> elems,
                    RoundEnvironment renv) {
                return false;
            }
        }
        ===
        Steps to reproduce:
        ===
        <ag153348@spb-orion> javac clss41701.java
        clss41701.java:18: a type variable may not be followed by other bounds
                         C extends A&B> {
                                     ^
        1 error
        <ag153348@spb-orion> javac DummyProcessor.java
        <ag153348@spb-orion> javac -cp . -processor DummyProcessor clss41701.java
        clss41701.java:18: a type variable may not be followed by other bounds
                         C extends A&B> {
                                     ^
        <ag153348@spb-orion> ls *.class
        DummyProcessor.class clss41701a.class
        clss41701.class clss41701i.class
        ===
        As you can see if an annotation processor specified the javac generates output classes.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jjg Jonathan Gibbons
                  Reporter:
                  agavrilosunw Alexey Gavrilov (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: