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

False positive with overload methods in StaticCandidate #397

Closed
romani opened this issue Nov 10, 2015 · 0 comments
Closed

False positive with overload methods in StaticCandidate #397

romani opened this issue Nov 10, 2015 · 0 comments
Assignees
Milestone

Comments

@romani
Copy link
Member

@romani romani commented Nov 10, 2015

class A extends B {

    private void addStatus(int id, String status) { // VIOLATION on this method, fix cause compilation error
        executeUpdate("insert into ....", id, status); // executeUpdate(String sql, Object... params) is used
    }

    private void executeUpdate(String sql, Object... params) {
        executeUpdate(getConfig().getJdbcTemplate(), sql, params); //getConfig() is from parent class
    }

    private static void executeUpdate(JdbcTemplate template, String sql, Object... params) {
        template.update(sql, params);
    }

}
@romani romani changed the title False positive 2 in StaticCandidate False positive with overload methods in StaticCandidate Nov 10, 2015
Vladlis added a commit to Vladlis/sevntu.checkstyle that referenced this issue Nov 16, 2015
Vladlis added a commit to Vladlis/sevntu.checkstyle that referenced this issue Nov 16, 2015
@romani romani closed this Nov 16, 2015
@romani romani modified the milestone: 1.18 Nov 16, 2015
@romani romani added this to the 1.17.1 milestone Dec 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.