GitHub user wilderrodrigues opened a pull request:

    https://github.com/apache/cloudstack/pull/355

    Fix/coverity issues

    Fixing issues: 1012719, 1116509, 1116677 and 1116812
    
    I split commit between fixes and code formatting in order to keep the 
review as smooth as possible.
    
    The fixes include:
    * Commenting out an unused variable in the Test.java
    * Assigning the ResultSet returned by the prepared statement and closing it 
in the finally block
    * Avoiding catching only Exception. Makes the code too britle.
    * Catching the QemuImgException and throwing it to be caught further in the 
code
    * Surrounding the output stream with try/catch and throwing it to be 
further handled in the code. Closing the output stream quietly.
    * Replacing concatenation with 
optionsBuffer.append(option.getKey()).append('=').append(option.getValue()).append(',');
    
    Full build, including tests, was executed. I will deploy a DC and run VM 
Life Cycle on KVM and XenServer62. Report will follow.
    
    Cheers,
    Wilder

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/schubergphilis/cloudstack fix/coverity_issues

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/355.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #355
    
----
commit 9ac4e6b1c4d6812af88889c9edcccd7113035cf1
Author: wilderrodrigues <wrodrig...@schubergphilis.com>
Date:   2015-06-04T06:12:04Z

    Formatting the code
      - Adding final modifier to attributes and indenting the code.

commit 83429b8e61fbcb8c502b5c9ae08f7abfa7132370
Author: wilderrodrigues <wrodrig...@schubergphilis.com>
Date:   2015-06-04T06:12:50Z

    Coverity issue: 1012179
      - Commenting out unused variable.

commit 8d8952e72a886f78bfd12e6d443dc770c8d489d1
Author: wilderrodrigues <wrodrig...@schubergphilis.com>
Date:   2015-06-04T06:14:07Z

    Formatting the code
      - Adding final modifier and indenting the code

commit e478e35323014fae6bbfab3a97b4a3e8f0af6e6c
Author: wilderrodrigues <wrodrig...@schubergphilis.com>
Date:   2015-06-04T06:18:17Z

    Coverity issue 1116509
       - Assigning the the new returned ResultSet to the rs variable in order 
to get it closed in the finally block

commit a33dc17532869045942f5f07faecec9c6365d411
Author: wilderrodrigues <wrodrig...@schubergphilis.com>
Date:   2015-06-04T06:30:00Z

    Formatting the code
      - Adding final modifier and indenting the code

commit 85181167b0211d716eeb84704f9e9085f9f40e01
Author: wilderrodrigues <wrodrig...@schubergphilis.com>
Date:   2015-06-04T06:38:06Z

    Coverity issue 1116677
       - Avoiding catching only Exception. Makes the code too britle.
       - Catching the QemuImgException and throwing it to be caught further in 
the code
       - Surrounding the output stream with try/catch and throwing it to be 
further handled in the code. Closing the output stream quietly.

commit 082d66719831c68146bcfc87558e2f31ba05ceba
Author: wilderrodrigues <wrodrig...@schubergphilis.com>
Date:   2015-06-04T06:45:57Z

    Coverity issue 1116812
       - Replacing concatenation with 
optionsBuffer.append(option.getKey()).append('=').append(option.getValue()).append(',');

commit f68d02ce5e609b276c41f7940a52cdef5478a74f
Author: wilderrodrigues <wrodrig...@schubergphilis.com>
Date:   2015-06-04T06:47:00Z

    Renaming the variable from "s" to "script"

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to