summaryrefslogtreecommitdiffstats
path: root/auth/auth-cmd/src/main
diff options
context:
space:
mode:
authorPawel <pawel.kasperkiewicz@nokia.com>2018-11-23 05:23:01 -0500
committerPawel <pawel.kasperkiewicz@nokia.com>2018-11-23 05:23:01 -0500
commiteb9165705a614af7b98ee6b643f871eab1284976 (patch)
tree98da07b2d1d2198ad7ef66539d43d7dd3cf7d01c /auth/auth-cmd/src/main
parente92832a4f8dbcc18dff57ff09232c5b75687742e (diff)
refactor in AuthzCassServiceImpl.java
Change-Id: Icb04ac81ee11dbc8da1970a59fa03d5af75335aa Issue-ID: AAF-643 Signed-off-by: Pawel <pawel.kasperkiewicz@nokia.com>
Diffstat (limited to 'auth/auth-cmd/src/main')
-rw-r--r--auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/List.java21
1 files changed, 7 insertions, 14 deletions
diff --git a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/List.java b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/List.java
index 3074ab86..6733989e 100644
--- a/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/List.java
+++ b/auth/auth-cmd/src/main/java/org/onap/aaf/auth/cmd/user/List.java
@@ -50,14 +50,11 @@ public class List extends BaseCmd<User> {
reportHead(str);
int idx = 0;
java.util.List<aaf.v2_0.Users.User> sorted = users.getUser();
- Collections.sort(sorted, new Comparator<aaf.v2_0.Users.User>() {
- @Override
- public int compare(aaf.v2_0.Users.User u1, aaf.v2_0.Users.User u2) {
- if (u1==null || u2 == null) {
- return -1;
- }
- return u1.getId().compareTo(u2.getId());
+ Collections.sort(sorted, (Comparator<aaf.v2_0.Users.User>) (u1, u2) -> {
+ if (u1==null || u2 == null) {
+ return -1;
}
+ return u1.getId().compareTo(u2.getId());
});
String format = reportColHead("%-40s %-10s %-30s\n","User","Type","Expires");
String date = "XXXX-XX-XX";
@@ -77,13 +74,9 @@ public class List extends BaseCmd<User> {
reportHead(title,id);
String format = reportColHead(" %-20s %-20s %-11s %-6s %12s\n","User","Approver","Type","Status","Updated");
java.util.List<Approval> lapp = approvals.getApprovals();
- Collections.sort(lapp, new Comparator<Approval>() {
- @Override
- public int compare(Approval a1, Approval a2) {
- return a1.getTicket().compareTo(a2.getTicket());
- }
- } );
- String ticket = null, prev = null;
+ Collections.sort(lapp, (Comparator<Approval>) (a1, a2) -> a1.getTicket().compareTo(a2.getTicket()));
+ String ticket = null;
+ String prev = null;
for (Approval app : lapp ) {
ticket = app.getTicket();
if (!ticket.equals(prev)) {