AvoidModifiersForTypes throws Exception while processing modifier token which has type LITERAL_PRIVATE #410

Closed
MEZk opened this Issue Dec 19, 2015 · 2 comments

Projects

None yet

2 participants

@MEZk
Contributor
MEZk commented Dec 19, 2015

AvoidModifiersForTypes throws Exception while processing modifier token which has type LITERAL_PRIVATE. The problem is appeared due to the fact that the check does not take into account LITERAL_PRIVATE modifier of the variable.

See https://github.com/sevntu-checkstyle/sevntu.checkstyle/blob/81a2cf91fbb1d2ec18ffd6f5cfc2bb67828c4834/sevntu-checks/src/main/java/com/github/sevntu/checkstyle/checks/coding/AvoidModifiersForTypesCheck.java#L156

Configuration:

<?xml version="1.0" ?>

<!DOCTYPE module PUBLIC
        "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
        "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">

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

Input file: https://github.com/checkstyle/checkstyle/blob/e8475b41261f724128c869b4de371713d86228c3/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java

SevNTU Checkstyle 1.17.1 output:

Exception was thrown while processing checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/PackageObjectFactory.java: Found unsupported token: LITERAL_PRIVATE 
@yaziza yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 19, 2016
@yaziza yaziza Issue #410: Fix exception while processing types with LITERAL_PRIVATE…
… modifiers
722267b
@yaziza yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 19, 2016
@yaziza yaziza Issue #410: Fix exception while processing types with LITERAL_PRIVATE…
… modifiers
85ce559
@yaziza yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 23, 2016
@yaziza yaziza Issue #410: Fix exception while processing types with LITERAL_PRIVATE…
… modifiers
b1dcb4d
@yaziza yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 23, 2016
@yaziza yaziza Issue #410: Fix exception while processing types with LITERAL_PRIVATE…
… modifiers
3421c05
@yaziza yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 23, 2016
@yaziza yaziza Issue #410: Fix exception while processing types with LITERAL_PRIVATE…
… modifiers
679c8ff
@yaziza yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 24, 2016
@yaziza yaziza Issue #410: Fix exception while processing types with LITERAL_PRIVATE…
… modifiers
bb077cb
@yaziza yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 24, 2016
@yaziza yaziza Issue #410: Fix exception while processing types with LITERAL_PRIVATE…
… modifiers
062e57d
@yaziza yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 27, 2016
@yaziza yaziza Issue #410: Fix exception while processing types with LITERAL_PRIVATE…
… modifiers
e494528
@yaziza yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Mar 1, 2016
@yaziza yaziza Issue #410: Fix exception while processing types with LITERAL_PRIVATE…
… modifiers
919e00b
@yaziza yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Mar 19, 2016
@yaziza yaziza Issue #410: Fix exception while processing types with LITERAL_PRIVATE…
… modifiers
433094a
@yaziza yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Mar 19, 2016
@yaziza yaziza Issue #410: Fix exception while processing types with LITERAL_PRIVATE…
… modifiers
9bde389
@yaziza yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Mar 19, 2016
@yaziza yaziza Issue #410: Fix exception while processing types with LITERAL_PRIVATE…
… modifiers
01f4a16
@yaziza yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Mar 20, 2016
@yaziza yaziza Issue #410: Fix exception while processing types with LITERAL_PRIVATE…
… modifiers
eb32933
@yaziza yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Mar 20, 2016
@yaziza yaziza Issue #410: Update default configuration for AvoidModifiersForTypesCheck 04d8ed4
@yaziza yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Mar 20, 2016
@yaziza yaziza Issue #410: Update default configuration for AvoidModifiersForTypesCheck 1121800
@yaziza yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Mar 20, 2016
@yaziza yaziza Issue #410: Update default configuration for AvoidModifiersForTypesCheck 994de51
@romani romani added this to the 1.20 milestone Mar 20, 2016
@romani
Member
romani commented Mar 21, 2016

fix is merged.

@romani romani closed this Mar 21, 2016
@romani
Member
romani commented Mar 25, 2016

@yaziza , your update is released, please enforce it over checkstyle code - checkstyle/checkstyle#3064

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