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

Add timestamp #26

Merged
merged 4 commits into from Jul 10, 2018
Merged

Add timestamp #26

merged 4 commits into from Jul 10, 2018

Conversation

kurtnordstrom
Copy link
Contributor

No description provided.

@@ -250,34 +253,45 @@ public void setTenant(String tenant) {
}

@Override
public Future<PermissionData> getUserAndExpandedPermissions(String userid, JsonArray permissions) {
public Future<PermissionData> getUserAndExpandedPermissions(String userid,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR Refactor this method to reduce its Cognitive Complexity from 31 to the 30 allowed. rule

System.out.println("getUserAndExpandedPermissions, userid=" + userid + "permissions=" +
permissions.encode());
logger.info("Retrieving permissions for userid " + userid + " and expanding permissions for " +
permissions.encode());
CacheEntry[] currentCache = new CacheEntry[1];
if(cacheEntries) {
currentCache[0] = cacheMap.getOrDefault(userid, null);
if(key == null && userid == null && permissions != null) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR Remove this expression which always evaluates to "true" rule

@id-jenkins
Copy link

SonarQube analysis reported 8 issues

  • MAJOR 2 major
  • MINOR 6 minor

Watch the comments in this conversation to review them.

6 extra issues

Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

  1. MINOR MainVerticle.java#L187: Remove this redundant jump. rule
  2. MINOR MainVerticle.java#L192: Remove this redundant jump. rule
  3. MINOR DummyPermissionsSource.java#L25: Remove this redundant jump. rule
  4. MINOR DummyPermissionsSource.java#L30: Remove this redundant jump. rule
  5. MINOR DummyPermissionsSource.java#L35: Remove this redundant jump. rule
  6. MINOR DummyPermissionsSource.java#L40: Remove this redundant jump. rule

@kurtnordstrom kurtnordstrom merged commit dab8d00 into master Jul 10, 2018
@adamdickmeiss adamdickmeiss deleted the add_timestamp branch March 15, 2019 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants