Sonar Fixes, Formatting
[aaf/authz.git] / auth / auth-certman / src / main / java / org / onap / aaf / auth / cm / mapper / Mapper2_0.java
index 53388f6..501fbcf 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -49,7 +49,7 @@ import certman.v1_0.CertificateRequest;
 
 
 public class Mapper2_0 implements Mapper<BaseRequest,CertInfo,Artifacts,Error> {
-    
+
     @Override
     public Class<?> getClass(API api) {
         switch(api) {
@@ -127,7 +127,7 @@ public class Mapper2_0 implements Mapper<BaseRequest,CertInfo,Artifacts,Error> {
                 }
                 cout.setNotes(sb.toString());
             }
-            
+
             List<String> caIssuerDNs = cout.getCaIssuerDNs();
             for (String s : cin.caIssuerDNs()) {
                 caIssuerDNs.add(s);
@@ -212,9 +212,9 @@ public class Mapper2_0 implements Mapper<BaseRequest,CertInfo,Artifacts,Error> {
             data.machine = trim(arti.getMachine());
             if(arti.getType()!=null) {
                 Set<String> ss = data.type(true);
-                   for(String t : arti.getType()) {
-                       ss.add(t.trim());
-                   }
+                for(String t : arti.getType()) {
+                    ss.add(t.trim());
+                }
             }
             data.type(true).addAll(arti.getType());
             data.ca = trim(arti.getCa());
@@ -224,14 +224,14 @@ public class Mapper2_0 implements Mapper<BaseRequest,CertInfo,Artifacts,Error> {
             data.ns = trim(arti.getNs());
             data.renewDays = arti.getRenewDays();
             data.notify = trim(arti.getNotification());
-            
+
             // Ignored on way in for create/update
             data.sponsor = trim(arti.getSponsor());
             data.expires = null;
             if(arti.getSans()!=null) {
               Set<String> ss = data.sans(true);
               for(String s : arti.getSans()) {
-                 ss.add(s.trim());
+                  ss.add(s.trim());
               }
             }
             ladd.add(data);
@@ -240,14 +240,14 @@ public class Mapper2_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();
+        }
+    }
 
-       /* (non-Javadoc)
+    /* (non-Javadoc)
      * @see org.onap.aaf.auth.cm.mapper.Mapper#fromArtifacts(org.onap.aaf.auth.layer.test.Result)
      */
     @Override
@@ -274,7 +274,7 @@ public class Mapper2_0 implements Mapper<BaseRequest,CertInfo,Artifacts,Error> {
             return Result.err(lArtiDAO);
         }
     }
-    
-    
+
+
 
 }
\ No newline at end of file