> On Nov. 27, 2013, 10:28 a.m., daan Hoogland wrote:
> > server/src/com/cloud/api/doc/ApiXmlDocWriter.java, line 142
> > <https://reviews.apache.org/r/15667/diff/2/?file=391485#file391485line142>
> >
> >     shouldn't this go in a finally clause?

Didn't add a finally to the try/catch block because it might not happen. There 
is a if block before, and the try/catch is surrounded by it. There could be the 
case that we move the try/catch outside, but then we would have code into the 
block that wouldn't cause neither a ClassNotFound nor a NoClassDefFound 
exception/error.


> On Nov. 27, 2013, 10:28 a.m., daan Hoogland wrote:
> > server/src/com/cloud/server/ConfigurationServerImpl.java, line 745
> > <https://reviews.apache.org/r/15667/diff/2/?file=391486#file391486line745>
> >
> >     shouldn't these go to a finally clause?

For that one, yes... I can change it in order to have the DataInputStream 
outside the tr/catch and close it in the finally. By the way, closing the 
DataInputStream is enough, since it's created based on the FileInputStream. So, 
closing it will close the other one as well. Will fix that.


- Wilder


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


On Nov. 27, 2013, 9:47 a.m., Wilder Rodrigues wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15667/
> -----------------------------------------------------------
> 
> (Updated Nov. 27, 2013, 9:47 a.m.)
> 
> 
> Review request for cloudstack and Hugo Trippaers.
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> Fixing resource leak on Coverity issues CID_1116744, CID_1116718 and 
> CID_1116682.
> 
> The resource leak problems were mostly related to InpuStreams instantiated 
> and not closed after used.
> 
> 
> Diffs
> -----
> 
>   
> framework/ipc/src/org/apache/cloudstack/framework/serializer/OnwireClassRegistry.java
>  177ae09 
>   server/src/com/cloud/api/doc/ApiXmlDocWriter.java a91530b 
>   server/src/com/cloud/server/ConfigurationServerImpl.java cfc95ca 
> 
> Diff: https://reviews.apache.org/r/15667/diff/
> 
> 
> Testing
> -------
> 
> A full build was executed on top of the branch created for these changes. 
> After committed and patched, the a brand new branch was created from Master 
> and patched with this patch. Everything worked fine.
> 
> No new feature was added.
> 
> 
> Thanks,
> 
> Wilder Rodrigues
> 
>

Reply via email to