Return-Path: X-Original-To: apmail-cloudstack-issues-archive@www.apache.org Delivered-To: apmail-cloudstack-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C078E17660 for ; Tue, 4 Nov 2014 23:34:34 +0000 (UTC) Received: (qmail 61326 invoked by uid 500); 4 Nov 2014 23:34:34 -0000 Delivered-To: apmail-cloudstack-issues-archive@cloudstack.apache.org Received: (qmail 60998 invoked by uid 500); 4 Nov 2014 23:34:34 -0000 Mailing-List: contact issues-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list issues@cloudstack.apache.org Received: (qmail 60865 invoked by uid 500); 4 Nov 2014 23:34:34 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 60862 invoked by uid 99); 4 Nov 2014 23:34:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Nov 2014 23:34:34 +0000 Date: Tue, 4 Nov 2014 23:34:34 +0000 (UTC) From: "Nitin Mehta (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CLOUDSTACK-7289) Bugs seen when declaring a class variable as native type (long) and have its getter method returning the corresponding object (Long) and vice versa MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CLOUDSTACK-7289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nitin Mehta updated CLOUDSTACK-7289: ------------------------------------ Fix Version/s: (was: 4.5.0) 4.6.0 > Bugs seen when declaring a class variable as native type (long) and have its getter method returning the corresponding object (Long) and vice versa > --------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: CLOUDSTACK-7289 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7289 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the default.) > Affects Versions: 4.5.0 > Reporter: Nitin Mehta > Assignee: Nitin Mehta > Priority: Critical > Fix For: 4.6.0 > > > Declare a variable as native type (long) and have its getter method > returning the corresponding object (Long). This is what I fixed with CLOUDSTACK-7272. > Example below. This should be fixed in the entire code base. > Autoboxing causes NPE or defaults some values. The vice versa should be > fixed as well meaning declaring hostId as Long and returning as native > type (long). > long hostId > Long getHostId(){ > return hostId; > } > Right Implementation (hostId is declared as Long) > Long hostId; > Long getHostId(){ > return hostId; > } -- This message was sent by Atlassian JIRA (v6.3.4#6332)