diff options
Diffstat (limited to 'auth/auth-cass/src/main/java/org')
-rw-r--r-- | auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/CacheInfoDAO.java | 2 | ||||
-rw-r--r-- | auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/HistoryDAO.java | 6 |
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; } |