Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C530C200C64 for ; Fri, 14 Apr 2017 00:47:46 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C3D1F160BA7; Thu, 13 Apr 2017 22:47:46 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E320C160B98 for ; Fri, 14 Apr 2017 00:47:45 +0200 (CEST) Received: (qmail 84920 invoked by uid 500); 13 Apr 2017 22:47:45 -0000 Mailing-List: contact dev-help@atlas.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@atlas.incubator.apache.org Delivered-To: mailing list dev@atlas.incubator.apache.org Received: (qmail 84909 invoked by uid 99); 13 Apr 2017 22:47:45 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Apr 2017 22:47:45 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id B109FC6783 for ; Thu, 13 Apr 2017 22:47:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -98.702 X-Spam-Level: X-Spam-Status: No, score=-98.702 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_NUMSUBJECT=0.5, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id X7dkI3u8z94i for ; Thu, 13 Apr 2017 22:47:43 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id C9E3A5FAE0 for ; Thu, 13 Apr 2017 22:47:42 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 1DEF2E0D20 for ; Thu, 13 Apr 2017 22:47:42 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id BFFE02406A for ; Thu, 13 Apr 2017 22:47:41 +0000 (UTC) Date: Thu, 13 Apr 2017 22:47:41 +0000 (UTC) From: "Ashutosh Mestry (JIRA)" To: dev@atlas.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (ATLAS-1735) Coverity Scan Issues Detected on 4/13 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 13 Apr 2017 22:47:47 -0000 Ashutosh Mestry created ATLAS-1735: -------------------------------------- Summary: Coverity Scan Issues Detected on 4/13 Key: ATLAS-1735 URL: https://issues.apache.org/jira/browse/ATLAS-1735 Project: Atlas Issue Type: Bug Components: atlas-core Affects Versions: trunk, 0.8-incubating Reporter: Ashutosh Mestry Priority: Minor Fix For: trunk Please find the latest report on new defect(s) introduced to Apache Atlas found with Coverity Scan. 6 new defect(s) introduced to Apache Atlas found with Coverity Scan. 1 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 6 of 6 defect(s) ** CID 161397: Null pointer dereferences (NULL_RETURNS) /common/src/main/java/org/apache/atlas/utils/AuthenticationUtil.java: 57 in org.apache.atlas.utils.AuthenticationUtil.getBasicAuthenticationInput()() ________________________________________________________________________________________________________ *** CID 161397: Null pointer dereferences (NULL_RETURNS) /common/src/main/java/org/apache/atlas/utils/AuthenticationUtil.java: 57 in org.apache.atlas.utils.AuthenticationUtil.getBasicAuthenticationInput()() 51 String username = null; 52 String password = null; 53 54 try { 55 Console console = System.console(); 56 username = console.readLine("Enter username for atlas :- "); >>> CID 161397: Null pointer dereferences (NULL_RETURNS) >>> Dereferencing a pointer that might be null "console.readPassword("Enter password for atlas :- ")" when calling "String". 57 password = new String(console.readPassword("Enter password for atlas :- ")); 58 } catch (Exception e) { 59 System.out.print("Error while reading "); 60 System.exit(1); 61 } 62 return new String[]{username, password}; 63 } 64 ** CID 161396: Null pointer dereferences (NULL_RETURNS) /repository/src/test/java/org/apache/atlas/repository/impexp/ZipFileResourceTestUtils.java: 148 in org.apache.atlas.repository.impexp.ZipFileResourceTestUtils.runAndVerifyQuickStart_v1_Import(org.apache.atlas.repository.impexp.ImportService, org.apache.atlas.repository.impexp.ZipSource)() ________________________________________________________________________________________________________ *** CID 161396: Null pointer dereferences (NULL_RETURNS) /repository/src/test/java/org/apache/atlas/repository/impexp/ZipFileResourceTestUtils.java: 148 in org.apache.atlas.repository.impexp.ZipFileResourceTestUtils.runAndVerifyQuickStart_v1_Import(org.apache.atlas.repository.impexp.ImportService, org.apache.atlas.repository.impexp.ZipSource)() 142 AtlasImportResult result = importService.run(source, request, userName, hostName, requestingIP); 143 Assert.assertEquals(result.getOperationStatus(), AtlasImportResult.OperationStatus.SUCCESS); 144 return result; 145 } 146 147 public static void runAndVerifyQuickStart_v1_Import(ImportService importService, ZipSource zipSource) throws AtlasBaseException, IOException { >>> CID 161396: Null pointer dereferences (NULL_RETURNS) >>> Assigning: "exportResult" = null return value from "getExportResult". 148 AtlasExportResult exportResult = zipSource.getExportResult(); 149 List creationOrder = zipSource.getCreationOrder(); 150 151 AtlasImportRequest request = getDefaultImportRequest(); 152 AtlasImportResult result = runImportWithParameters(importService, request, zipSource); 153 ** CID 161395: Null pointer dereferences (NULL_RETURNS) /repository/src/test/java/org/apache/atlas/repository/impexp/ExportServiceTest.java: 256 in org.apache.atlas.repository.impexp.ExportServiceTest.verifyExportForEmployeeData(org.apache.atlas.repository.impexp.ZipSource)() ________________________________________________________________________________________________________ *** CID 161395: Null pointer dereferences (NULL_RETURNS) /repository/src/test/java/org/apache/atlas/repository/impexp/ExportServiceTest.java: 256 in org.apache.atlas.repository.impexp.ExportServiceTest.verifyExportForEmployeeData(org.apache.atlas.repository.impexp.ZipSource)() 250 Assert.assertNotNull(zipSource.getCreationOrder()); 251 Assert.assertEquals(zipSource.getCreationOrder().size(), 2); 252 Assert.assertTrue(zipSource.hasNext()); 253 254 while (zipSource.hasNext()) { 255 AtlasEntity entity = zipSource.next(); >>> CID 161395: Null pointer dereferences (NULL_RETURNS) >>> Calling a method on null object "entity". 256 Assert.assertEquals(entity.getStatus(), AtlasEntity.Status.ACTIVE); 257 Assert.assertTrue(expectedEntityTypes.contains(entity.getTypeName())); 258 } 259 260 verifyTypeDefs(zipSource); 261 } ** CID 161394: Null pointer dereferences (NULL_RETURNS) /repository/src/test/java/org/apache/atlas/repository/impexp/ZipSourceTest.java: 101 in org.apache.atlas.repository.impexp.ZipSourceTest.iteratorBehavor_WorksAsExpected(org.apache.atlas.repository.impexp.ZipSource)() ________________________________________________________________________________________________________ *** CID 161394: Null pointer dereferences (NULL_RETURNS) /repository/src/test/java/org/apache/atlas/repository/impexp/ZipSourceTest.java: 101 in org.apache.atlas.repository.impexp.ZipSourceTest.iteratorBehavor_WorksAsExpected(org.apache.atlas.repository.impexp.ZipSource)() 95 public void iteratorBehavor_WorksAsExpected(ZipSource zipSource) throws IOException, AtlasBaseException { 96 Assert.assertTrue(zipSource.hasNext()); 97 98 List creationOrder = zipSource.getCreationOrder(); 99 for (int i = 0; i < creationOrder.size(); i++) { 100 AtlasEntity e = zipSource.next(); >>> CID 161394: Null pointer dereferences (NULL_RETURNS) >>> Calling a method on null object "e". 101 Assert.assertEquals(e.getGuid(), creationOrder.get(i)); 102 } 103 104 Assert.assertFalse(zipSource.hasNext()); 105 } ** CID 161393: Null pointer dereferences (NULL_RETURNS) /repository/src/test/java/org/apache/atlas/repository/impexp/ExportServiceTest.java: 269 in org.apache.atlas.repository.impexp.ExportServiceTest.verifyExportForHrData(org.apache.atlas.repository.impexp.ZipSource)() ________________________________________________________________________________________________________ *** CID 161393: Null pointer dereferences (NULL_RETURNS) /repository/src/test/java/org/apache/atlas/repository/impexp/ExportServiceTest.java: 269 in org.apache.atlas.repository.impexp.ExportServiceTest.verifyExportForHrData(org.apache.atlas.repository.impexp.ZipSource)() 263 private void verifyExportForHrData(ZipSource zipSource) throws IOException, AtlasBaseException { 264 Assert.assertNotNull(zipSource.getCreationOrder()); 265 Assert.assertTrue(zipSource.getCreationOrder().size() == 1); 266 Assert.assertTrue(zipSource.hasNext()); 267 268 AtlasEntity entity = zipSource.next(); >>> CID 161393: Null pointer dereferences (NULL_RETURNS) >>> Calling a method on null object "entity". 269 Assert.assertTrue(entity.getTypeName().equals("Department")); 270 Assert.assertEquals(entity.getStatus(), AtlasEntity.Status.ACTIVE); 271 verifyTypeDefs(zipSource); 272 } 273 274 private void verifyExportForHrDataForConnected(ZipSource zipSource) throws IOException, AtlasBaseException { ** CID 161392: Null pointer dereferences (NULL_RETURNS) /repository/src/test/java/org/apache/atlas/repository/impexp/ExportServiceTest.java: 280 in org.apache.atlas.repository.impexp.ExportServiceTest.verifyExportForHrDataForConnected(org.apache.atlas.repository.impexp.ZipSource)() ________________________________________________________________________________________________________ *** CID 161392: Null pointer dereferences (NULL_RETURNS) /repository/src/test/java/org/apache/atlas/repository/impexp/ExportServiceTest.java: 280 in org.apache.atlas.repository.impexp.ExportServiceTest.verifyExportForHrDataForConnected(org.apache.atlas.repository.impexp.ZipSource)() 274 private void verifyExportForHrDataForConnected(ZipSource zipSource) throws IOException, AtlasBaseException { 275 Assert.assertNotNull(zipSource.getCreationOrder()); 276 Assert.assertTrue(zipSource.getCreationOrder().size() == 2); 277 Assert.assertTrue(zipSource.hasNext()); 278 279 AtlasEntity entity = zipSource.next(); >>> CID 161392: Null pointer dereferences (NULL_RETURNS) >>> Calling a method on null object "entity". 280 Assert.assertTrue(entity.getTypeName().equals("Department")); 281 Assert.assertEquals(entity.getStatus(), AtlasEntity.Status.ACTIVE); 282 verifyTypeDefs(zipSource); 283 } 284 285 private void verifyTypeDefs(ZipSource zipSource) throws AtlasBaseException { -- This message was sent by Atlassian JIRA (v6.3.15#6346)