KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Our project contains many statements in the method chaining fluent style: int totalCount = ((Number) em .createQuery("select count(up) from UserPermission up where " + "up.database.id = :dbId and " + "up.user.id <> :currentUserId ") .setParameter("dbId", cmd.getDatabaseId()) .setParameter("currentUserId", currentUser.getId()) .getSingleResult()) .intValue(); I've got checkstyle mostly configured to match our existing code style, but now it's failing on these snippets, preferring instead: int totalCount = ((Number) em .createQuery("select count(up) from UserPermission up where " + "up.database.id = :dbId and " + "up.user.id <> :currentUserId ") .setParameter("dbId", cmd.getDatabaseId()) .setParameter("currentUserId", currentUser.getId()) .getSingleResult()) .intValue(); Which is totally inappropriate. Is there anyway to configure checkstyle to accept the method chaining style? Is there an alternate tool I can run from maven to enforce this kind of indentation?
Tags (comma-separated)
Save Edits
Cancel