ATLAS-1735: Coverity Scan Fixes for 4/13

Signed-off-by: apoorvnaik <anaik@hortonworks.com>
diff --git a/common/src/main/java/org/apache/atlas/utils/AuthenticationUtil.java b/common/src/main/java/org/apache/atlas/utils/AuthenticationUtil.java
index b5b0026..09d8085 100644
--- a/common/src/main/java/org/apache/atlas/utils/AuthenticationUtil.java
+++ b/common/src/main/java/org/apache/atlas/utils/AuthenticationUtil.java
@@ -54,7 +54,12 @@
         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);
diff --git a/repository/src/test/java/org/apache/atlas/repository/impexp/ExportServiceTest.java b/repository/src/test/java/org/apache/atlas/repository/impexp/ExportServiceTest.java
index bac831b..a7c70a9 100644
--- a/repository/src/test/java/org/apache/atlas/repository/impexp/ExportServiceTest.java
+++ b/repository/src/test/java/org/apache/atlas/repository/impexp/ExportServiceTest.java
@@ -253,6 +253,8 @@
 
         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 @@
         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 @@
         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);
diff --git a/repository/src/test/java/org/apache/atlas/repository/impexp/ZipSourceTest.java b/repository/src/test/java/org/apache/atlas/repository/impexp/ZipSourceTest.java
index e124ffc..8b042d7 100644
--- a/repository/src/test/java/org/apache/atlas/repository/impexp/ZipSourceTest.java
+++ b/repository/src/test/java/org/apache/atlas/repository/impexp/ZipSourceTest.java
@@ -49,6 +49,7 @@
     @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 @@
         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));
         }