cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nitin Mehta (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CLOUDSTACK-7289) Declare a variable as native type (long) and have its getter method returning the corresponding object (Long)
Date Fri, 08 Aug 2014 00:26:12 GMT

     [ https://issues.apache.org/jira/browse/CLOUDSTACK-7289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Nitin Mehta updated CLOUDSTACK-7289:
------------------------------------

    Description: 
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;
}

  was:
Declare a variable as native type (long) and have its getter method
returning the corresponding object (Long). This is what I fixed here.
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;
}


> Declare a variable as native type (long) and have its getter method returning the corresponding
object (Long)
> -------------------------------------------------------------------------------------------------------------
>
>                 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
>            Priority: Critical
>             Fix For: 4.5.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.2#6252)

Mime
View raw message