Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
MEZk opened this issue Dec 19, 2015 · 2 comments
Milestone

Comments

@MEZk
Copy link
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

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 added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 19, 2016
yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 19, 2016
yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 23, 2016
yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 23, 2016
yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 23, 2016
yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 24, 2016
yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 24, 2016
yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Jan 27, 2016
yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Mar 1, 2016
yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Mar 19, 2016
yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Mar 19, 2016
yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Mar 19, 2016
yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Mar 20, 2016
yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Mar 20, 2016
yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Mar 20, 2016
yaziza added a commit to yaziza/sevntu.checkstyle that referenced this issue Mar 20, 2016
@romani romani added this to the 1.20 milestone Mar 20, 2016
romani added a commit that referenced this issue Mar 20, 2016
Issue #410: Update default configuration for AvoidModifiersForTypesCheck
@romani
Copy link
Member

romani commented Mar 21, 2016

fix is merged.

@romani romani closed this as completed Mar 21, 2016
@romani
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants