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

Comments

Projects
None yet
2 participants
@romani
Member

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 from False positive 2 in StaticCandidate to 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