diff options
author | ezhil <ezhrajam@in.ibm.com> | 2018-12-26 17:17:26 +0530 |
---|---|---|
committer | ezhil <ezhrajam@in.ibm.com> | 2018-12-26 17:17:40 +0530 |
commit | 55e3b97835370d4984c1a6f17c558df5183f9f67 (patch) | |
tree | ab23adb1d4131e6fe0334bdf7c4de71d2c190f31 /auth/auth-batch/src/main/java | |
parent | 52c89c9940544c1b2db1dd1e0ce9b22e2fcdca42 (diff) |
Fixed sonar issue in Notification.java
Fixed sonar issues
Issue-ID: AAF-685
Change-Id: I74e792e621d1964aa40c22d2c53e228eec2837e6
Signed-off-by: ezhil <ezhrajam@in.ibm.com>
Diffstat (limited to 'auth/auth-batch/src/main/java')
-rw-r--r-- | auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Notification.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Notification.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Notification.java index 5c7a8269..ac6cb67d 100644 --- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Notification.java +++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Notification.java @@ -4,6 +4,8 @@ * =========================================================================== * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. * =========================================================================== + * Modifications Copyright (C) 2018 IBM. + * =========================================================================== * 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 @@ -77,7 +79,7 @@ public class Notification { public final String user; public final TYPE type; public Date last; - public int checksum; + public int checkSum; public Message msg; private int current; public Organization org; @@ -87,7 +89,7 @@ public class Notification { this.user = user; this.type = nt; this.last = last; - this.checksum = checksum; + this.checkSum = checksum; current = 0; count = 0; } @@ -147,11 +149,11 @@ public class Notification { @Override public Notification create(Row row) { int idx =row.getInt(1); - TYPE type = TYPE.get(idx); - if (type==null) { + TYPE typeCreator = TYPE.get(idx); + if (typeCreator==null) { return null; } - return new Notification(row.getString(0), type, row.getTimestamp(2), row.getInt(3)); + return new Notification(row.getString(0), typeCreator, row.getTimestamp(2), row.getInt(3)); } @Override @@ -180,7 +182,7 @@ public class Notification { public boolean update(AuthzTrans trans, Session session, boolean dryRun) { checksum(); - if (last==null || current==0 || current!=checksum) { + if (last==null || current==0 || current!=checkSum) { last = now; current = checksum(); String update = "UPDATE authz.notify SET " + @@ -204,6 +206,6 @@ public class Notification { public String toString() { return "\"" + user + "\",\"" + type.name() + "\",\"" - + Chrono.dateTime(last)+ "\", " + checksum; + + Chrono.dateTime(last)+ "\", " + checkSum; } }
\ No newline at end of file |