Update Fixes from testing
[aaf/authz.git] / auth / auth-certman / src / main / java / org / onap / aaf / auth / cm / mapper / Mapper1_0.java
index 22243ae..1c95196 100644 (file)
@@ -36,7 +36,6 @@ import org.onap.aaf.auth.dao.cass.ArtiDAO.Data;
 import org.onap.aaf.auth.dao.cass.CertDAO;
 import org.onap.aaf.auth.env.AuthzTrans;
 import org.onap.aaf.auth.layer.Result;
-import org.onap.aaf.cadi.util.FQI;
 import org.onap.aaf.cadi.util.Vars;
 
 import aaf.v2_0.Error;
@@ -223,10 +222,10 @@ public class Mapper1_0 implements Mapper<BaseRequest,CertInfo,Artifacts,Error> {
             data.mechid = trim(arti.getMechid());
             data.machine = trim(arti.getMachine());
             if(arti.getType()!=null) {
-                   Set<String> ss = data.type(true);
-                   for(String t : arti.getType()) {
-                       ss.add(trim(t));
-                   }
+                Set<String> ss = data.type(true);
+                for(String t : arti.getType()) {
+                    ss.add(trim(t));
+                }
             }
             data.ca = trim(arti.getCa());
             data.dir = trim(arti.getDir());
@@ -240,9 +239,9 @@ public class Mapper1_0 implements Mapper<BaseRequest,CertInfo,Artifacts,Error> {
             data.sponsor = (arti.getSponsor());
             if(arti.getSans()!=null) {
                 Set<String> ls = data.sans(true);
-                   for(String t : arti.getSans()) {
-                       ls.add(trim(t));
-                   }
+                for(String t : arti.getSans()) {
+                    ls.add(trim(t));
+                }
             }
             data.expires = null;
             ladd.add(data);
@@ -266,13 +265,13 @@ public class Mapper1_0 implements Mapper<BaseRequest,CertInfo,Artifacts,Error> {
                 a.setCa(trim(arti.ca));
                 a.setDir(trim(arti.dir));
                 for(String t : arti.type(false)) {
-                       a.getType().add(trim(t));
+                    a.getType().add(trim(t));
                 }
                 a.setOsUser(trim(arti.os_user));
                 a.setRenewDays(arti.renewDays);
                 a.setNotification(trim(arti.notify));
                 for(String t : arti.sans(false)) {
-                       a.getSans().add(trim(t));
+                    a.getSans().add(trim(t));
                 }
                 artis.getArtifact().add(a);
             }
@@ -285,10 +284,10 @@ public class Mapper1_0 implements Mapper<BaseRequest,CertInfo,Artifacts,Error> {
     
 
     private String trim(String s) {
-       if(s==null) {
-               return s;
-       } else {
-               return s.trim();
-       }
-       }
+        if(s==null) {
+            return s;
+        } else {
+            return s.trim();
+        }
+    }
 }
\ No newline at end of file