From 3985d3b0e00c8137010c73770aecb1bb7b62b46f Mon Sep 17 00:00:00 2001 From: Keong Lim Date: Thu, 1 Nov 2018 16:59:29 +1100 Subject: AAI-1523 checkstyle warnings for aai-core 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 --- aai-core/src/test/java/org/onap/aai/AAISetup.java | 42 +++++------ .../test/java/org/onap/aai/AAISetupForSwagger.java | 14 ++-- .../org/onap/aai/AbstractConfigTranslator.java | 86 +++++++++++----------- .../src/test/java/org/onap/aai/HttpTestUtil.java | 16 ++-- 4 files changed, 79 insertions(+), 79 deletions(-) (limited to 'aai-core/src') diff --git a/aai-core/src/test/java/org/onap/aai/AAISetup.java b/aai-core/src/test/java/org/onap/aai/AAISetup.java index 08a7793a..b7a4f740 100644 --- a/aai-core/src/test/java/org/onap/aai/AAISetup.java +++ b/aai-core/src/test/java/org/onap/aai/AAISetup.java @@ -69,26 +69,26 @@ public abstract class AAISetup { public final SpringMethodRule springMethodRule = new SpringMethodRule(); @Autowired - protected Map moxyLoaderInstance; - - @Autowired - protected HttpEntry traversalHttpEntry; - - @Autowired - protected HttpEntry traversalUriHttpEntry; - - @Autowired - protected NodeIngestor nodeIngestor; - - @Autowired - protected LoaderFactory loaderFactory; + protected Map 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/"); } - - - + + + } diff --git a/aai-core/src/test/java/org/onap/aai/AAISetupForSwagger.java b/aai-core/src/test/java/org/onap/aai/AAISetupForSwagger.java index 90b1ccd0..07731770 100644 --- a/aai-core/src/test/java/org/onap/aai/AAISetupForSwagger.java +++ b/aai-core/src/test/java/org/onap/aai/AAISetupForSwagger.java @@ -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/"); } - - - + + + } diff --git a/aai-core/src/test/java/org/onap/aai/AbstractConfigTranslator.java b/aai-core/src/test/java/org/onap/aai/AbstractConfigTranslator.java index 7055b918..dc32e932 100644 --- a/aai-core/src/test/java/org/onap/aai/AbstractConfigTranslator.java +++ b/aai-core/src/test/java/org/onap/aai/AbstractConfigTranslator.java @@ -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> getNodeFiles() { - String prefix = bean.getNodeDirectory() + AAIConstants.AAI_FILESEP ; - - String suffix = ".xml"; - - Map> files = new TreeMap<>(); - for (SchemaVersion v : schemaVersions.getVersions()) { - - List container = getVersionNodeFiles(v); - - - files.put(v, container); - } - - return files; - } - + /* (non-Javadoc) + * @see org.onap.aai.setup.ConfigTranslator#getNodeFiles() + */ + @Override + public Map> getNodeFiles() { + String prefix = bean.getNodeDirectory() + AAIConstants.AAI_FILESEP ; + + String suffix = ".xml"; + + Map> files = new TreeMap<>(); + for (SchemaVersion v : schemaVersions.getVersions()) { + + List container = getVersionNodeFiles(v); + + + files.put(v, container); + } + + return files; + } + - public List getVersionNodeFiles(SchemaVersion v) { - Pattern p = Pattern.compile("aai(.*)"+"_oxm_(.*).xml" ); - - List 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 getVersionNodeFiles(SchemaVersion v) { + Pattern p = Pattern.compile("aai(.*)"+"_oxm_(.*).xml" ); + + List 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; + + } } diff --git a/aai-core/src/test/java/org/onap/aai/HttpTestUtil.java b/aai-core/src/test/java/org/onap/aai/HttpTestUtil.java index 1fd85fb7..82a3efdf 100644 --- a/aai-core/src/test/java/org/onap/aai/HttpTestUtil.java +++ b/aai-core/src/test/java/org/onap/aai/HttpTestUtil.java @@ -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; -- cgit 1.2.3-korg