summaryrefslogtreecommitdiffstats
path: root/auth/auth-cass/src/main/java/org/onap
diff options
context:
space:
mode:
authorInstrumental <jcgmisc@stl.gathman.org>2018-03-29 21:40:16 -0500
committerInstrumental <jcgmisc@stl.gathman.org>2018-03-29 21:40:24 -0500
commitb126c6c5f625432722405538692184f5c74edaad (patch)
treedcbc3a52cb13064356fa650c56fe9c90c475f6ff /auth/auth-cass/src/main/java/org/onap
parent36b62be84b398044e1feae657c662dba6247782f (diff)
Clean up Sonar results 3
Issue-ID: AAF-206 Change-Id: I4494990e8e0bd702b475bbbfb140eaadd566d2a0 Signed-off-by: Instrumental <jcgmisc@stl.gathman.org>
Diffstat (limited to 'auth/auth-cass/src/main/java/org/onap')
-rw-r--r--auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/CacheInfoDAO.java2
-rw-r--r--auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/HistoryDAO.java6
2 files changed, 4 insertions, 4 deletions
diff --git a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/CacheInfoDAO.java b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/CacheInfoDAO.java
index e47e9352..66ab7344 100644
--- a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/CacheInfoDAO.java
+++ b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/CacheInfoDAO.java
@@ -321,6 +321,7 @@ public class CacheInfoDAO extends CassDAOImpl<AuthzTrans,CacheInfoDAO.Data> impl
}
} catch (InterruptedException e1) {
go = false;
+ Thread.currentThread().interrupt();
}
} while(go);
}
@@ -353,6 +354,7 @@ public class CacheInfoDAO extends CassDAOImpl<AuthzTrans,CacheInfoDAO.Data> impl
}
} catch (InterruptedException e) {
trans.error().log("Cache Notify Queue posting was interrupted" );
+ Thread.currentThread().interrupt();
}
}
diff --git a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/HistoryDAO.java b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/HistoryDAO.java
index 8e4ada10..0cfc1dc5 100644
--- a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/HistoryDAO.java
+++ b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/HistoryDAO.java
@@ -56,9 +56,6 @@ import com.datastax.driver.core.Row;
public class HistoryDAO extends CassDAOImpl<AuthzTrans, HistoryDAO.Data> {
private static final String TABLE = "history";
- public static final SimpleDateFormat monthFormat = new SimpleDateFormat("yyyyMM");
-// private static final SimpleDateFormat dayTimeFormat = new SimpleDateFormat("ddHHmmss");
-
private String[] helpers;
private HistLoader defLoader;
@@ -177,7 +174,8 @@ public class HistoryDAO extends CassDAOImpl<AuthzTrans, HistoryDAO.Data> {
public static Data newInitedData() {
Data data = new Data();
Date now = new Date();
- data.yr_mon = Integer.parseInt(monthFormat.format(now));
+ // Sonar claims that SimpleDateFormat is not thread safe, so we can't be static
+ data.yr_mon = Integer.parseInt(new SimpleDateFormat("yyyyMM").format(now));
// data.day_time = Integer.parseInt(dayTimeFormat.format(now));
return data;
}