You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Rajani Karuturi <ra...@gmail.com> on 2014/07/16 14:37:04 UTC

Review Request 23550: Fixed coverity reported issues in UserVmManagerImpl

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23550/
-----------------------------------------------------------

Review request for cloudstack, daan Hoogland and Santhosh Edukulla.


Repository: cloudstack-git


Description
-------

    Fixed coverity reported issues in UserVmManagerImpl


Diffs
-----

  server/src/com/cloud/vm/UserVmManagerImpl.java dac4acf 

Diff: https://reviews.apache.org/r/23550/diff/


Testing
-------


Thanks,

Rajani Karuturi


Re: Review Request 23550: Fixed coverity reported issues in UserVmManagerImpl

Posted by Rajani Karuturi <ra...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23550/
-----------------------------------------------------------

(Updated July 21, 2014, 4:58 a.m.)


Review request for cloudstack, daan Hoogland and Santhosh Edukulla.


Bugs: COVERITY
    https://issues.apache.org/jira/browse/COVERITY


Repository: cloudstack-git


Description
-------

    Fixed coverity reported issues in UserVmManagerImpl


Diffs
-----

  server/src/com/cloud/vm/UserVmManagerImpl.java dac4acf 

Diff: https://reviews.apache.org/r/23550/diff/


Testing
-------


Thanks,

Rajani Karuturi


Re: Review Request 23550: Fixed coverity reported issues in UserVmManagerImpl

Posted by Santhosh Edukulla <sa...@citrix.com>.

> On July 16, 2014, 3:35 p.m., Santhosh Edukulla wrote:
> > server/src/com/cloud/vm/UserVmManagerImpl.java, line 856
> > <https://reviews.apache.org/r/23550/diff/1/?file=633467#file633467line856>
> >
> >     I believe we are verifying the max size of an integer? If yes, use limits,  something like Integer.MAX_VALUE, integer size varies according to platform. That way we dont need to worry about the numerical value and it is taken care automatically.
> 
> Rajani Karuturi wrote:
>     Integer.parseInt would never return a value > Integer.MAX_VALUE. It will throw NumberFormatException and NumbersUtil would return the default value -1. The max check would always be false and hence not required. 
>     
>     Also, Java integer size is platform independent and would always be 2^31 -1.

Ok, just add coverity to bugs column, as inquired on dev list.


- Santhosh


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23550/#review47889
-----------------------------------------------------------


On July 16, 2014, 12:37 p.m., Rajani Karuturi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23550/
> -----------------------------------------------------------
> 
> (Updated July 16, 2014, 12:37 p.m.)
> 
> 
> Review request for cloudstack, daan Hoogland and Santhosh Edukulla.
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
>     Fixed coverity reported issues in UserVmManagerImpl
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/vm/UserVmManagerImpl.java dac4acf 
> 
> Diff: https://reviews.apache.org/r/23550/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Rajani Karuturi
> 
>


Re: Review Request 23550: Fixed coverity reported issues in UserVmManagerImpl

Posted by Rajani Karuturi <ra...@gmail.com>.

> On July 16, 2014, 3:35 p.m., Santhosh Edukulla wrote:
> > server/src/com/cloud/vm/UserVmManagerImpl.java, line 856
> > <https://reviews.apache.org/r/23550/diff/1/?file=633467#file633467line856>
> >
> >     I believe we are verifying the max size of an integer? If yes, use limits,  something like Integer.MAX_VALUE, integer size varies according to platform. That way we dont need to worry about the numerical value and it is taken care automatically.

Integer.parseInt would never return a value > Integer.MAX_VALUE. It will throw NumberFormatException and NumbersUtil would return the default value -1. The max check would always be false and hence not required. 

Also, Java integer size is platform independent and would always be 2^31 -1. 


- Rajani


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23550/#review47889
-----------------------------------------------------------


On July 16, 2014, 12:37 p.m., Rajani Karuturi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23550/
> -----------------------------------------------------------
> 
> (Updated July 16, 2014, 12:37 p.m.)
> 
> 
> Review request for cloudstack, daan Hoogland and Santhosh Edukulla.
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
>     Fixed coverity reported issues in UserVmManagerImpl
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/vm/UserVmManagerImpl.java dac4acf 
> 
> Diff: https://reviews.apache.org/r/23550/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Rajani Karuturi
> 
>


Re: Review Request 23550: Fixed coverity reported issues in UserVmManagerImpl

Posted by Santhosh Edukulla <sa...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23550/#review47889
-----------------------------------------------------------



server/src/com/cloud/vm/UserVmManagerImpl.java
<https://reviews.apache.org/r/23550/#comment84117>

    I believe we are verifying the max size of an integer? If yes, use limits,  something like Integer.MAX_VALUE, integer size varies according to platform. That way we dont need to worry about the numerical value and it is taken care automatically.


- Santhosh Edukulla


On July 16, 2014, 12:37 p.m., Rajani Karuturi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23550/
> -----------------------------------------------------------
> 
> (Updated July 16, 2014, 12:37 p.m.)
> 
> 
> Review request for cloudstack, daan Hoogland and Santhosh Edukulla.
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
>     Fixed coverity reported issues in UserVmManagerImpl
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/vm/UserVmManagerImpl.java dac4acf 
> 
> Diff: https://reviews.apache.org/r/23550/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Rajani Karuturi
> 
>


Re: Review Request 23550: Fixed coverity reported issues in UserVmManagerImpl

Posted by Santhosh Edukulla <sa...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23550/#review48198
-----------------------------------------------------------

Ship it!


Ship It!

- Santhosh Edukulla


On July 16, 2014, 12:37 p.m., Rajani Karuturi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23550/
> -----------------------------------------------------------
> 
> (Updated July 16, 2014, 12:37 p.m.)
> 
> 
> Review request for cloudstack, daan Hoogland and Santhosh Edukulla.
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
>     Fixed coverity reported issues in UserVmManagerImpl
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/vm/UserVmManagerImpl.java dac4acf 
> 
> Diff: https://reviews.apache.org/r/23550/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Rajani Karuturi
> 
>