aboutsummaryrefslogtreecommitdiffstats
path: root/POLICY-SDK-APP/src/main/java/org/onap/policy/utils/UserUtils.java
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2019-10-14 11:39:45 -0400
committerPamela Dragosh <pdragosh@research.att.com>2019-10-14 21:14:27 -0400
commit0950d79047d3404c15b4dd30cffeb81346565f64 (patch)
treee5c9534b7f3349684dad00cab74c4b14b9dfe733 /POLICY-SDK-APP/src/main/java/org/onap/policy/utils/UserUtils.java
parent4e6615528e03f1a6f7808e28481bd55fe39ed572 (diff)
Sonar cleanup in controllers etc
Variable renaming of consecutive capital letters. Adding Javadoc Missing curly braces Re-writing some methods to reduce cyclomatic complexity Combining while's into a simple for statement. Addressing previous review comments No real effort on code coverage in this one. Issue-ID: POLICY-2133 Change-Id: I4afb3030203e1dbc743507e037ca3d57faf41f1d Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'POLICY-SDK-APP/src/main/java/org/onap/policy/utils/UserUtils.java')
-rw-r--r--POLICY-SDK-APP/src/main/java/org/onap/policy/utils/UserUtils.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/utils/UserUtils.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/utils/UserUtils.java
index 22c44863b..f9f93c0ff 100644
--- a/POLICY-SDK-APP/src/main/java/org/onap/policy/utils/UserUtils.java
+++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/utils/UserUtils.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -36,18 +36,18 @@ public final class UserUtils {
}
public static class Pair<T, U> {
- public final T t;
- public final U u;
+ public final T first;
+ public final U second;
- public Pair(T t, U u) {
- this.t = t;
- this.u = u;
+ public Pair(T first, U second) {
+ this.first = first;
+ this.second = second;
}
}
/**
* Check Role and its Scopes.
- *
+ *
* @param userRoles list of UserRoles.
* @return return role and scope from UserRole Object.
*/
@@ -76,7 +76,7 @@ public final class UserUtils {
/**
* Get Role by Scope based on UserRole Object.
- *
+ *
* @param userRoles list of UserRoles.
* @return return the map<scope, role>.
*/
@@ -95,7 +95,7 @@ public final class UserUtils {
/**
* Read non super role scopes and add to map.
- *
+ *
* @param userRole Role Object.
* @param rolesList roleList Object.
* @return return the map<scope, role>.
@@ -116,7 +116,7 @@ public final class UserUtils {
/**
* Trim Scope Value.
- *
+ *
* @param scope string scope name.
* @return trim scope.
*/