Collection syntax change because of Sonar
[aaf/authz.git] / auth / auth-gui / src / main / java / org / onap / aaf / auth / gui / pages / NsHistory.java
index 414f992..6d55858 100644 (file)
@@ -37,7 +37,6 @@ import org.onap.aaf.auth.gui.Page;
 import org.onap.aaf.auth.gui.Table;
 import org.onap.aaf.auth.gui.Table.Cells;
 import org.onap.aaf.auth.gui.table.AbsCell;
-import org.onap.aaf.auth.gui.table.RefCell;
 import org.onap.aaf.auth.gui.table.TableData;
 import org.onap.aaf.auth.gui.table.TextCell;
 import org.onap.aaf.cadi.CadiException;
@@ -146,7 +145,6 @@ public class NsHistory extends Page {
         *
         */
        private static class Model extends TableData<AAF_GUI,AuthzTrans> {
-               private static final String CSP_ATT_COM = "@csp.att.com";
                private static final String[] headers = new String[] {"Date","User","Memo"};
                private Slot name;
                private Slot dates;
@@ -170,7 +168,7 @@ public class NsHistory extends Page {
                                return Cells.EMPTY;
                        }
                        
-                       final ArrayList<AbsCell[]> rv = new ArrayList<AbsCell[]>();
+                       final ArrayList<AbsCell[]> rv = new ArrayList<>();
                        String msg = null;
                        final TimeTaken tt = trans.start("AAF Get History for Namespace ["+oName+"]",Env.REMOTE);
                        try {
@@ -196,13 +194,13 @@ public class NsHistory extends Page {
                                                                
                                                                for (Item i : histItems) {
                                                                        String user = i.getUser();
-                                                                       AbsCell userCell = (user.endsWith(CSP_ATT_COM)?
-                                                                                       new RefCell(user,WEBPHONE + user.substring(0,user.indexOf('@')),true):new TextCell(user));
+                                                                       AbsCell userCell = new TextCell(user);
                                                                        
+                                                                       String memo = i.getMemo().replace("<script>", "&lt;script&gt;").replace("</script>", "&lt;/script&gt;");
                                                                        rv.add(new AbsCell[] {
                                                                                        new TextCell(i.getTimestamp().toGregorianCalendar().getTime().toString()),
                                                                                        userCell,
-                                                                                       new TextCell(i.getMemo())
+                                                                                       new TextCell(memo)
                                                                        });
                                                                }
                                                        } finally {