Showing 189 of 206 total issues
Method isNotDeletableByUser
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private boolean isNotDeletableByUser(final User user, final HierarchyNode node)
throws SQLException, GeneralSecurityException, UnsupportedEncodingException {
if(node.getType() == HierarchyNode.OBJECT_NODE) {
AccessControl ac = AccessControlDAO.getInstance().getAccessControl(user, node.getName());
return (ac != null && ac.getModifyKey() != null);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method doEndTag
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public int doEndTag() {
try {
JspWriter writer = pageContext.getOut();
writer.print("<input type=\"");
writer.print(type);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ensureReasonSuppliedIfRequired
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public boolean ensureReasonSuppliedIfRequired(HttpServletRequest request, PasswordBase thisPassword)
throws SQLException, RedirectException {
String reasonRequired = configurationDAO.get(ConfigurationOption.PASSWORD_REASON_FOR_VIEWING_REQUIRED);
if( reasonRequired.charAt(0) != 'y') {
clearReasonSessionAttributes(request);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method getClosestValidNodeToRequested
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private HierarchyNode getClosestValidNodeToRequested(HttpServletRequest request, User user, String nodeId)
throws SQLException, GeneralSecurityException {
HierarchyNodeDAO hnDAO = HierarchyNodeDAO.getInstance();
HierarchyNode node = hnDAO.getById(nodeId);
if(node == null || node.getType() == HierarchyNode.USER_CONTAINER_NODE) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method compare
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public int compare(final Password passwordObject0, final Password passwordObject1) {
try {
if (passwordObject0 == passwordObject1) {
return 0;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method getById
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public AuthenticationSource getById(final String sourceId)
throws SQLException {
if (sourceId == null || sourceId.equals(AuthenticationSource.DEFAULT_SOURCE_ID)) {
return AuthenticationSource.DEFAULT_SOURCE;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method doPost
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
protected void doPost(final HttpServletRequest request, final HttpServletResponse response)
throws ServletException, IOException {
HttpSession session = getClearSession(request);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method setAccessibleByGroup
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void setAccessibleByGroup( final HierarchyNode node, final String groupId, final byte accessibility)
throws SQLException {
String sql;
if (accessibility == ACCESIBILITY_DEFAULT) {
sql = DELETE_GROUP_NODE_RULE_SQL;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method setAccessibleByUser
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void setAccessibleByUser( final HierarchyNode node, final User user, final byte accessibility)
throws SQLException, GeneralSecurityException {
String sql;
if (accessibility == ACCESIBILITY_DEFAULT) {
sql = DELETE_USER_NODE_RULE_SQL;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"