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 283FF200C6A for ; Wed, 19 Apr 2017 16:46:46 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 26B64160BAD; Wed, 19 Apr 2017 14:46: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 1FF10160B86 for ; Wed, 19 Apr 2017 16:46:44 +0200 (CEST) Received: (qmail 41342 invoked by uid 500); 19 Apr 2017 14:46:44 -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 41331 invoked by uid 99); 19 Apr 2017 14:46:44 -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; Wed, 19 Apr 2017 14:46:44 +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 DED77C0F25 for ; Wed, 19 Apr 2017 14:46:43 +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-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id nKe5XvRNqSMU for ; Wed, 19 Apr 2017 14:46:42 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 715AE60D83 for ; Wed, 19 Apr 2017 14:46: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 E9168E06BB for ; Wed, 19 Apr 2017 14:46:41 +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 A47F421B45 for ; Wed, 19 Apr 2017 14:46:41 +0000 (UTC) Date: Wed, 19 Apr 2017 14:46:41 +0000 (UTC) From: "Apoorv Naik (JIRA)" To: dev@atlas.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (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: Wed, 19 Apr 2017 14:46:46 -0000 [ https://issues.apache.org/jira/browse/ATLAS-1735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15974809#comment-15974809 ] Apoorv Naik commented on ATLAS-1735: ------------------------------------ Committed to master and 0.8 incubating master = https://git1-us-west.apache.org/repos/asf/incubator-atlas/commit?p=incubator-atlas.git;a=commit;h=29524aa06de730ce80b2a42672e46d1f5492d4cd 0.8 = https://git1-us-west.apache.org/repos/asf/incubator-atlas/commit?p=incubator-atlas.git;a=commit;h=e60b2655d59fff396c4abc7b21a1cf85b453cd89 Thanks Ashutosh > 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 > Assignee: Ashutosh Mestry > Priority: Minor > Fix For: trunk, 0.8-incubating > > Attachments: ATLAS-1735-Coverity-Scan-fixes.patch > > > 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)