AAI-1523 checkstyle warnings for aai-core 00/73000/1
authorKeong Lim <keong.lim@huawei.com>
Thu, 1 Nov 2018 05:59:29 +0000 (16:59 +1100)
committerKeong Lim <keong.lim@huawei.com>
Mon, 19 Nov 2018 03:55:03 +0000 (14:55 +1100)
Issue-ID: AAI-1523
re-indent code with spaces to clean up some checkstyle warnings
for aai-core test (part of 24k lines of output)

Change-Id: I3b33fbe46458e4f0f3273c48ff9cfb0673ae18f4
Signed-off-by: Keong Lim <keong.lim@huawei.com>
aai-core/src/test/java/org/onap/aai/AAISetup.java
aai-core/src/test/java/org/onap/aai/AAISetupForSwagger.java
aai-core/src/test/java/org/onap/aai/AbstractConfigTranslator.java
aai-core/src/test/java/org/onap/aai/HttpTestUtil.java

index 08a7793..b7a4f74 100644 (file)
@@ -69,26 +69,26 @@ public abstract class AAISetup {
     public final SpringMethodRule springMethodRule = new SpringMethodRule();
 
     @Autowired
-       protected  Map<SchemaVersion, MoxyLoader>  moxyLoaderInstance;
-       
-       @Autowired
-       protected HttpEntry traversalHttpEntry;
-       
-       @Autowired
-       protected HttpEntry traversalUriHttpEntry;
-       
-       @Autowired
-       protected NodeIngestor nodeIngestor;
-       
-       @Autowired
-       protected LoaderFactory loaderFactory;
+    protected  Map<SchemaVersion, MoxyLoader>  moxyLoaderInstance;
+    
+    @Autowired
+    protected HttpEntry traversalHttpEntry;
+    
+    @Autowired
+    protected HttpEntry traversalUriHttpEntry;
+    
+    @Autowired
+    protected NodeIngestor nodeIngestor;
+    
+    @Autowired
+    protected LoaderFactory loaderFactory;
 
-       @Autowired
-       protected SchemaVersions schemaVersions;
+    @Autowired
+    protected SchemaVersions schemaVersions;
 
-       @Value("${schema.uri.base.path}")
-       protected String basePath;
-       
+    @Value("${schema.uri.base.path}")
+    protected String basePath;
+    
     protected static final String SERVICE_NAME = "JUNIT";
 
     @BeforeClass
@@ -98,7 +98,7 @@ public abstract class AAISetup {
         System.setProperty("aai.service.name", SERVICE_NAME);
         QueryFormatTestHelper.setFinalStatic(AAIConstants.class.getField("AAI_HOME_ETC_OXM"), "src/test/resources/bundleconfig-local/etc/oxm/");
     }
-       
-       
-       
+    
+    
+    
 }
index 90b1ccd..0773177 100644 (file)
@@ -53,10 +53,10 @@ public abstract class AAISetupForSwagger {
     public final SpringMethodRule springMethodRule = new SpringMethodRule();
 
    
-       @Autowired
-       protected NodeIngestor nodeIngestor;
-       
-       
+    @Autowired
+    protected NodeIngestor nodeIngestor;
+    
+    
     protected static final String SERVICE_NAME = "JUNIT";
 
     @BeforeClass
@@ -66,7 +66,7 @@ public abstract class AAISetupForSwagger {
         System.setProperty("aai.service.name", SERVICE_NAME);
         QueryFormatTestHelper.setFinalStatic(AAIConstants.class.getField("AAI_HOME_ETC_OXM"), "src/test/resources/bundleconfig-local/etc/oxm/");
     }
-       
-       
-       
+    
+    
+    
 }
index 7055b91..dc32e93 100644 (file)
@@ -34,52 +34,52 @@ import org.onap.aai.util.AAIConstants;
  */
 public abstract class AbstractConfigTranslator extends ConfigTranslator {
 
-       public AbstractConfigTranslator(SchemaLocationsBean bean, SchemaVersions schemaVersions) {
-               super(bean, schemaVersions);
-       }
+    public AbstractConfigTranslator(SchemaLocationsBean bean, SchemaVersions schemaVersions) {
+        super(bean, schemaVersions);
+    }
 
-       
+    
 
-       /* (non-Javadoc)
-        * @see org.onap.aai.setup.ConfigTranslator#getNodeFiles()
-        */
-       @Override
-       public Map<SchemaVersion, List<String>> getNodeFiles() {
-               String prefix = bean.getNodeDirectory() + AAIConstants.AAI_FILESEP ;
-               
-               String suffix = ".xml";
-               
-               Map<SchemaVersion, List<String>> files = new TreeMap<>();
-               for (SchemaVersion v : schemaVersions.getVersions()) {
-                       
-                       List<String> container = getVersionNodeFiles(v);
-                       
-                       
-                       files.put(v, container);
-               }
-               
-               return files;
-       }
-       
+    /* (non-Javadoc)
+     * @see org.onap.aai.setup.ConfigTranslator#getNodeFiles()
+     */
+    @Override
+    public Map<SchemaVersion, List<String>> getNodeFiles() {
+        String prefix = bean.getNodeDirectory() + AAIConstants.AAI_FILESEP ;
+        
+        String suffix = ".xml";
+        
+        Map<SchemaVersion, List<String>> files = new TreeMap<>();
+        for (SchemaVersion v : schemaVersions.getVersions()) {
+            
+            List<String> container = getVersionNodeFiles(v);
+            
+            
+            files.put(v, container);
+        }
+        
+        return files;
+    }
+    
 
-       public List<String> getVersionNodeFiles(SchemaVersion v) {
-               Pattern p = Pattern.compile("aai(.*)"+"_oxm_(.*).xml" );
-               
-               List<String> container = new ArrayList<>();
-               String directoryName = bean.getNodeDirectory() + AAIConstants.AAI_FILESEP  + v.toString() + AAIConstants.AAI_FILESEP ;
-               
-               File[] files = new File(directoryName).listFiles();
-               for (File f : files) {
-                       String fileName = f.getName();
-                       Matcher m = p.matcher(fileName);
-                       if (m.find()) {
-                               String file = directoryName + m.group();
-                               container.add(file.toString());
-                       }
+    public List<String> getVersionNodeFiles(SchemaVersion v) {
+        Pattern p = Pattern.compile("aai(.*)"+"_oxm_(.*).xml" );
+        
+        List<String> container = new ArrayList<>();
+        String directoryName = bean.getNodeDirectory() + AAIConstants.AAI_FILESEP  + v.toString() + AAIConstants.AAI_FILESEP ;
+        
+        File[] files = new File(directoryName).listFiles();
+        for (File f : files) {
+            String fileName = f.getName();
+            Matcher m = p.matcher(fileName);
+            if (m.find()) {
+                String file = directoryName + m.group();
+                container.add(file.toString());
+            }
             
-               }
-               return container;
-               
-       }
+        }
+        return container;
+        
+    }
 
 }
index 1fd85fb..82a3efd 100644 (file)
@@ -52,11 +52,11 @@ import static org.mockito.Mockito.when;
 
 public class HttpTestUtil extends RESTAPI {
 
-       
-       protected HttpEntry traversalHttpEntry;
-       
-       protected HttpEntry traversalUriHttpEntry;
-       
+    
+    protected HttpEntry traversalHttpEntry;
+    
+    protected HttpEntry traversalUriHttpEntry;
+    
     private static final EELFLogger logger = EELFManager.getInstance().getLogger(HttpTestUtil.class);
 
     protected static final MediaType APPLICATION_JSON = MediaType.valueOf("application/json");
@@ -179,9 +179,9 @@ public class HttpTestUtil extends RESTAPI {
             response = responsesTuple.getValue1().get(0).getValue1();
 
         } catch (AAIException e) {
-                       response = this.consumerExceptionResponseGenerator(httpHeaders, uriInfo, HttpMethod.PUT, e);
-                       success = false;
-               } catch(Exception e){
+            response = this.consumerExceptionResponseGenerator(httpHeaders, uriInfo, HttpMethod.PUT, e);
+            success = false;
+        } catch(Exception e){
             AAIException ex = new AAIException("AAI_4000", e);
             response = this.consumerExceptionResponseGenerator(httpHeaders, uriInfo, HttpMethod.PUT, ex);
             success = false;