I think in the branches 4.4 and above we should use try-resource-construct for 
all the upgrade paths.

Otherwise we will continue to see resource leaks due to copy-paste-modified 
code.

~Rajani
Sent from my Windows Phone
________________________________
From: Daan Hoogland<mailto:daan.hoogl...@gmail.com>
Sent: ‎07-‎06-‎2014 01:53
To: dev<mailto:dev@cloudstack.apache.org>
Subject: [DISCUSS] try-with-resouce use

H,

I have commited a patch to Upgrade430to440.java that removes all
close() calls on PreparedStament en ResultSet objects, replacing it
with the try(<resouce>) construct in java 7. I was tempted for a short
moment to back-port it to older Upgrade classes. As those upgrade
paths are to be supported by lower versions of java. In master (and
branch 4.4) however these are only to be run with java 7. So should we
fix the upgrades by try-with-resources or not?

--
Daan

Reply via email to