Java 8 Grammar: annotation on generic type #3240

Closed
rnveach opened this Issue Jun 2, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@rnveach
Member

rnveach commented Jun 2, 2016

Taken from PR #3230 when working on Issue #3033 from a run on OpenJDK 8/9.

$ cat TestClass.java
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;

class TestClass <@Nullable T> {
}

@Target(ElementType.TYPE_USE)
@interface Nullable {
}

$ cat TestConfig.xml
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
          "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
          "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">

<module name="Checker">
    <property name="charset" value="UTF-8"/>

    <module name="TreeWalker">
    </module>
</module>

$ java -jar checkstyle-6.19-all.jar -c TestConfig.xml TestClass.java
Starting audit...
TestClass.java:4:18: expecting IDENT, found '@'
Audit done.

Input is compilable with java 8 javac.

@romani romani changed the title from Java 8 Grammar: missing annotation 3 to Java 8 Grammar: annotation on generic type Jun 2, 2016

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Jun 2, 2016

Member

Input is compilable with java 8 javac.

next time please put javac command to console output as it is requesred at http://checkstyle.sourceforge.net/report_issue.html#How_to_report_a_bug

Member

romani commented Jun 2, 2016

Input is compilable with java 8 javac.

next time please put javac command to console output as it is requesred at http://checkstyle.sourceforge.net/report_issue.html#How_to_report_a_bug

rnveach added a commit to rnveach/checkstyle that referenced this issue Jun 2, 2016

romani added a commit that referenced this issue Jun 2, 2016

@romani romani added this to the 7.0 milestone Jun 2, 2016

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Jun 2, 2016

Member

fix is merged.

Member

romani commented Jun 2, 2016

fix is merged.

@romani romani closed this Jun 2, 2016

@romani romani added the bug label Jun 3, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment