summaryrefslogtreecommitdiffstats
path: root/auth/auth-gui/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'auth/auth-gui/src/main')
-rw-r--r--auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PendingRequestsShow.java5
-rw-r--r--auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RolesShow.java9
2 files changed, 4 insertions, 10 deletions
diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PendingRequestsShow.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PendingRequestsShow.java
index e55d803c..a42d6b0b 100644
--- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PendingRequestsShow.java
+++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/PendingRequestsShow.java
@@ -23,7 +23,6 @@ package org.onap.aaf.auth.gui.pages;
import java.io.IOException;
import java.net.ConnectException;
-import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collections;
@@ -60,7 +59,6 @@ public class PendingRequestsShow extends Page {
public static final String HREF = "/gui/myrequests";
public static final String NAME = "MyRequests";
static final String WEBPHONE = "http://webphone.att.com/cgi-bin/webphones.pl?id=";
- private static DateFormat createdDF = new SimpleDateFormat("yyyy-MM-dd");
public PendingRequestsShow(final AAF_GUI gui, final Page ... breadcrumbs) throws APIException, IOException {
super(gui.env, NAME,HREF, NO_FIELDS,
@@ -153,7 +151,8 @@ public class PendingRequestsShow extends Page {
tsCell = AbsCell.Null;
} else {
UUID id = UUID.fromString(a.getId());
- tsCell = new RefCell(createdDF.format((id.timestamp() - NUM_100NS_INTERVALS_SINCE_UUID_EPOCH)/10000),
+ // Sonar says SimpleDate should not be static
+ tsCell = new RefCell(new SimpleDateFormat("yyyy-MM-dd").format((id.timestamp() - NUM_100NS_INTERVALS_SINCE_UUID_EPOCH)/10000),
RequestDetail.HREF + "?ticket=" + ticket,false);
prevTicket = ticket;
}
diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RolesShow.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RolesShow.java
index 071666d0..e3f91ba3 100644
--- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RolesShow.java
+++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/pages/RolesShow.java
@@ -58,11 +58,6 @@ import aaf.v2_0.UserRoles;
public class RolesShow extends Page {
public static final String HREF = "/gui/myroles";
private static final String DATE_TIME_FORMAT = "yyyy-MM-dd";
- private static SimpleDateFormat expiresDF;
-
- static {
- expiresDF = new SimpleDateFormat(DATE_TIME_FORMAT);
- }
public RolesShow(final AAF_GUI gui, final Page ... breadcrumbs) throws APIException, IOException {
super(gui.env, "MyRoles",HREF, NO_FIELDS,
@@ -101,7 +96,7 @@ public class RolesShow extends Page {
if(u.getExpires().compare(Chrono.timeStamp()) < 0) {
AbsCell[] sa = new AbsCell[] {
new TextCell(u.getRole() + "*", "class=expired"),
- new TextCell(expiresDF.format(u.getExpires().toGregorianCalendar().getTime()),"class=expired"),
+ new TextCell(new SimpleDateFormat(DATE_TIME_FORMAT).format(u.getExpires().toGregorianCalendar().getTime()),"class=expired"),
new RefCell("Extend",
UserRoleExtend.HREF + "?user="+trans.user()+"&role="+u.getRole(),
false,
@@ -118,7 +113,7 @@ public class RolesShow extends Page {
new RefCell(u.getRole(),
RoleDetail.HREF+"?role="+u.getRole(),
false),
- new TextCell(expiresDF.format(u.getExpires().toGregorianCalendar().getTime())),
+ new TextCell(new SimpleDateFormat(DATE_TIME_FORMAT).format(u.getExpires().toGregorianCalendar().getTime())),
AbsCell.Null,
new RefCell("Remove",
UserRoleRemove.HREF + "?user="+trans.user()+"&role="+u.getRole(),