db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Vallet" <sval...@t-systems.fr>
Subject OutputStream not closed when writing sqldb.map
Date Fri, 13 Jun 2003 11:13:06 GMT
Hi,

I noticed the stream on sqldb.map is not closed when generating sql and
corresponding entries in sqldb.map :

in TorqueSQLTask.java, on line 189 (torque3.0 and 3.1-alpha1):

sqldbmap.store(new FileOutputStream(getSqlDbMap()), "Sqlfile -> Database
map");

and from the Java API Doc v1.4.1 (Properties class):
public void store(OutputStream out, String header) throws IOException
[...]
After the entries have been written, the output stream is flushed. The
output stream remains open after this method returns.

I'm not sure that is a bug, but is annoying to me, because I need to delete
the file ; so I changed my local copy to the following :

 FileOutputStream fos = new FileOutputStream(getSqlDbMap());
 sqldbmap.store(fos, "Sqlfile -> Database map");
 fos.close();

Shouldn't this be fixed in the official release ? I'll send a patch if
necessary.

Regards,
Simon
--
Simon Vallet
T-Systems e-technologies
svallet@t-systems.fr


Mime
View raw message