Commit 29524aa0 by ashutoshm Committed by apoorvnaik

ATLAS-1735: Coverity Scan Fixes for 4/13

parent be93da8b
......@@ -54,7 +54,12 @@ public final class AuthenticationUtil {
try {
Console console = System.console();
username = console.readLine("Enter username for atlas :- ");
password = new String(console.readPassword("Enter password for atlas :- "));
char[] pwdChar = console.readPassword("Enter password for atlas :- ");
if(pwdChar != null) {
password = new String(pwdChar);
}
} catch (Exception e) {
System.out.print("Error while reading ");
System.exit(1);
......
......@@ -253,6 +253,8 @@ public class ExportServiceTest {
while (zipSource.hasNext()) {
AtlasEntity entity = zipSource.next();
Assert.assertNotNull(entity);
Assert.assertEquals(entity.getStatus(), AtlasEntity.Status.ACTIVE);
Assert.assertTrue(expectedEntityTypes.contains(entity.getTypeName()));
}
......@@ -266,6 +268,8 @@ public class ExportServiceTest {
Assert.assertTrue(zipSource.hasNext());
AtlasEntity entity = zipSource.next();
Assert.assertNotNull(entity);
Assert.assertTrue(entity.getTypeName().equals("Department"));
Assert.assertEquals(entity.getStatus(), AtlasEntity.Status.ACTIVE);
verifyTypeDefs(zipSource);
......@@ -277,6 +281,8 @@ public class ExportServiceTest {
Assert.assertTrue(zipSource.hasNext());
AtlasEntity entity = zipSource.next();
Assert.assertNotNull(entity);
Assert.assertTrue(entity.getTypeName().equals("Department"));
Assert.assertEquals(entity.getStatus(), AtlasEntity.Status.ACTIVE);
verifyTypeDefs(zipSource);
......
......@@ -49,6 +49,7 @@ public class ZipSourceTest {
@Test(dataProvider = "zipFileStocks")
public void examineContents_BehavesAsExpected(ZipSource zipSource) throws IOException, AtlasBaseException {
List<String> creationOrder = zipSource.getCreationOrder();
Assert.assertNotNull(creationOrder);
Assert.assertEquals(creationOrder.size(), 4);
......@@ -98,6 +99,8 @@ public class ZipSourceTest {
List<String> creationOrder = zipSource.getCreationOrder();
for (int i = 0; i < creationOrder.size(); i++) {
AtlasEntity e = zipSource.next();
Assert.assertNotNull(e);
Assert.assertEquals(e.getGuid(), creationOrder.get(i));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment