diff options
author | 2018-03-07 18:17:22 -0800 | |
---|---|---|
committer | 2018-03-08 09:17:48 -0800 | |
commit | 327b17ab250b4c17cf3f91f5e4cd9bffd89f3d1e (patch) | |
tree | 0d943226962ae31c0bf2fd0696e91c6bb41d099c /packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/ArquillianPackagerForITCases.java | |
parent | dee036198ee09d71bfdd50247c1d23a7f472df87 (diff) |
Reduce log noise/warnings format to conventions
Reduce build log warnings by formatting tests
to ONAP code conventions (removing tabs etc.)
Issue-ID: SO-368
Change-Id: I48c6d359b83617aebeb79db4e30c1d72d31f7eec
Signed-off-by: Marcus G K Williams <marcus.williams@intel.com>
Diffstat (limited to 'packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/ArquillianPackagerForITCases.java')
-rw-r--r-- | packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/ArquillianPackagerForITCases.java | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/ArquillianPackagerForITCases.java b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/ArquillianPackagerForITCases.java index 200e1d2621..4e86f664d6 100644 --- a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/ArquillianPackagerForITCases.java +++ b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/ArquillianPackagerForITCases.java @@ -36,42 +36,42 @@ import org.jboss.shrinkwrap.api.spec.WebArchive; public class ArquillianPackagerForITCases { - public static Archive<?> createPackageFromExistingOne(String path, String globPattern, String newPackageName) { - Path dir = Paths.get(path); + public static Archive<?> createPackageFromExistingOne(String path, String globPattern, String newPackageName) { + Path dir = Paths.get(path); - try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir, globPattern)) { - Iterator<Path> it = stream.iterator(); - if (it.hasNext()) { + try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir, globPattern)) { + Iterator<Path> it = stream.iterator(); + if (it.hasNext()) { - if (newPackageName.endsWith(".war")) { - File archive = it.next().toFile(); - WebArchive webArchive = ShrinkWrap.create(WebArchive.class, newPackageName); - webArchive.merge((ShrinkWrap.createFromZipFile(WebArchive.class, archive))); - return webArchive; - } else if (newPackageName.endsWith(".jar")) { - File archive = it.next().toFile(); - JavaArchive javaArchive = ShrinkWrap.create(JavaArchive.class, newPackageName); - javaArchive.merge((ShrinkWrap.createFromZipFile(JavaArchive.class, archive))); - return javaArchive; - } else if (newPackageName.endsWith(".ear")) { - File archive = it.next().toFile(); - EnterpriseArchive earArchive = ShrinkWrap.create(EnterpriseArchive.class, newPackageName); - earArchive.merge((ShrinkWrap.createFromZipFile(EnterpriseArchive.class, archive))); - return earArchive; - } else { - return null; - } + if (newPackageName.endsWith(".war")) { + File archive = it.next().toFile(); + WebArchive webArchive = ShrinkWrap.create(WebArchive.class, newPackageName); + webArchive.merge((ShrinkWrap.createFromZipFile(WebArchive.class, archive))); + return webArchive; + } else if (newPackageName.endsWith(".jar")) { + File archive = it.next().toFile(); + JavaArchive javaArchive = ShrinkWrap.create(JavaArchive.class, newPackageName); + javaArchive.merge((ShrinkWrap.createFromZipFile(JavaArchive.class, archive))); + return javaArchive; + } else if (newPackageName.endsWith(".ear")) { + File archive = it.next().toFile(); + EnterpriseArchive earArchive = ShrinkWrap.create(EnterpriseArchive.class, newPackageName); + earArchive.merge((ShrinkWrap.createFromZipFile(EnterpriseArchive.class, archive))); + return earArchive; + } else { + return null; + } - } else { - return null; - } + } else { + return null; + } + + } catch (IOException e) { + e.printStackTrace(); + return null; + } + + } - } catch (IOException e) { - e.printStackTrace(); - return null; - } - } - - } |