Implement AutoCloseable interface in SQLProcessor Class

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Implement AutoCloseable interface in SQLProcessor Class

Yash Sharma
Hello All,

SQLProcessor class has a close method which does work of closing of
ResultSet, PreparedStatement and Connection, we can use AutoCloseable
interface to do that.

Please share your thoughts.
--
Thanks,
*Pradhan Yash Sharma*
Reply | Threaded
Open this post in threaded view
|

Re: Implement AutoCloseable interface in SQLProcessor Class

Jacques Le Roux
Administrator
Le 12/10/2017 à 16:09, Yash Sharma a écrit :
> Hello All,
>
> SQLProcessor class has a close method which does work of closing of
> ResultSet, PreparedStatement and Connection, we can use AutoCloseable
> interface to do that.
>
> Please share your thoughts.
Hi Yash,

I see no reasons why we would not, cleaner and safer code

Jacques

Reply | Threaded
Open this post in threaded view
|

Re: Implement AutoCloseable interface in SQLProcessor Class

Yash Sharma
Thank You, Jacques, I have created a Jira Ticket for the same OFBIZ-9841
<https://issues.apache.org/jira/browse/OFBIZ-9841> and will provide the
patch soon.


On Thu, Oct 12, 2017 at 9:04 PM Jacques Le Roux <
[hidden email]> wrote:

> Le 12/10/2017 à 16:09, Yash Sharma a écrit :
> > Hello All,
> >
> > SQLProcessor class has a close method which does work of closing of
> > ResultSet, PreparedStatement and Connection, we can use AutoCloseable
> > interface to do that.
> >
> > Please share your thoughts.
> Hi Yash,
>
> I see no reasons why we would not, cleaner and safer code
>
> Jacques
>
> --
Thanks,
*Pradhan Yash Sharma*