Showing 189 of 206 total issues
Method importPermission
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void importPermission(final Password thePassword, final String permission)
throws SQLException, GeneralSecurityException, UnsupportedEncodingException {
char permissionType = permission.charAt(1);
if (permissionType != 'M' && permissionType != 'V') {
return;
- 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 getMultiple
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
List<Password> getMultiple(User accessingUser, final String sql, final String... parameters)
throws SQLException, GeneralSecurityException, IOException {
List<Password> results = super.getMultiple(sql, parameters);
if (results.isEmpty()) {
return results;
- 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 getParameterValue
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public String getParameterValue(final HttpServletRequest request, final String parameterName) {
String value = (String) request.getAttribute(parameterName);
if (value == null || value.length() == 0)
value = request.getParameter(parameterName);
if (value == null || value.length() == 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 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 updateAccessControl
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private boolean updateAccessControl(AccessControl adminAc, AccessControl currentAccessControl,
PasswordPermission permission,
AccessControlBuilder<? extends AccessControl> accessControlBuilder) {
boolean changed = false;
if( permission.allowsRead && currentAccessControl.getReadKey() == 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 doPost
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
protected final void doPost(final HttpServletRequest request, final HttpServletResponse response)
throws ServletException, IOException {
try {
User thisUser = SecurityUtils.getRemoteUser(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 doGet
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
protected void doGet(final HttpServletRequest request, final HttpServletResponse response)
throws ServletException, IOException {
PasswordRestriction restriction = 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 getByIdForTime
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public HistoricalPassword getByIdForTime(final AccessControl ac, final String id, final long dt) throws SQLException {
if (id == null) {
return 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 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 {
request.setAttribute("error_page", "/admin/im_install_stage1.jsp");
- 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 isChild
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
boolean isChild(final HierarchyNode parent, final HierarchyNode child)
throws SQLException {
final String parentId = parent.getNodeId();
if (parentId.equals(HierarchyNode.ROOT_NODE_ID) || child.getParentId().equals(parentId)
|| parent.equals(child)) {
- 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 waitForString
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void waitForString( String theString )
throws IOException {
InputWaiter waiter;
if ( theString.startsWith("stdout") ) {
waiter = new InputWaiter(stdout, theString.substring(7, theString.length()), WAIT_TIMEOUT);
- 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 addExpiryDetails
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void addExpiryDetails(HttpServletRequest request, ServletUtils servletUtils, Password password)
throws SQLException {
long expiryDate;
PasswordRestriction restriction = PasswordRestrictionDAO.getInstance().getById(password.getRestrictionId());
long expiry = password.getExpiry();
- 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 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 determineHierarchyEditability
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void determineHierarchyEditability(HttpServletRequest request, User user)
throws SQLException {
request.setAttribute("edithierarchy_allowed", "N");
if(userClassifier.isNonViewingUser(user)) {
return;
- 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 doGet
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void doGet(final HttpServletRequest request, final HttpServletResponse response)
throws ServletException, IOException {
String userId = request.getParameter("userId");
if (userId == 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 setNotViewing
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void setNotViewing(final User theUser, final boolean status)
throws SQLException, GeneralSecurityException, UnsupportedEncodingException {
MembershipDAO mDAO = MembershipDAO.getInstance();
if(status) {
- 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 doGet
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
protected void doGet(final HttpServletRequest request, final HttpServletResponse response)
throws ServletException, IOException {
try {
- 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"