Re: [Simple-support] Bug in Persister
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2007-06-12 11:17:14
|
I agree, Ill make sure this is fixed in the next release....
----- Original Message ----
From: Federico Fissore <fed...@fi...>
To: sim...@li...
Sent: Tuesday, June 12, 2007 12:05:24 PM
Subject: Re: [Simple-support] Bug in Persister
Marco Vergari ha scritto:
> public <T> T read(Class<? extends T> type, File source) throws Exception {
> FileInputStream fis = new FileInputStream(source); // Patch: Close the
> FileInputStream
> try {
> return (T)read(type, fis);
> } finally {
> fis.close();
> }
> }
>
>
uhhm... IMHO the method should work with the object without changing its
state. That said, read methods that use "raw" inputstream and reader
should leave that stream/reader the way they received it, avoinding to
close it
Instead, read methods that accept String and File should close it, as
they created and opened the corresponding stream/reader
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
____________________________________________________________________________________
Luggage? GPS? Comic books?
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz
|