Hi, yesterday I was looking into some OGR datastore issue when I noticed, for the n-th time, that my temp dir was filled with temporary files left by geotools builds.
By filled, I mean I had 10000+ files that could be accounted to past geotools builds and left there. More than 9000 were .shx, .qix, .dbf and the like, that is, leftovers of the shapefile module build, whilst some hundreds came from the gt2-image module (.prj and .world files). Besides being annoying, having thousands of files in the temp dir makes windows slow as a dog every time an app tries to create a new temp file (which happens with a good frequency). I therefore suggest everyone on Windows to go to c:\documents and settings\user\local settings\temp and delete all the garbage that accumulated there (and unix folks, probably go on /tmp and do the same). Long story short, when playing with temp files in test, please, double check files gets deleted. Anyways, I worked on it, and found out that shapefile tried to delete the extra files, but due to a bug, couldn't. I fixed the unit tests, and made sure the r-tree stuff closed its channels before throwing an exception during object construction (the only case where you can't try and close the object properly). gt2-image marked for deletion only the image file, but not the ancillary files. I got the code from gt2-shapefile and made it delete the other temp files too. Only the last coverage cannot be deleted, apparently no matter what I do there is still something opened against the .jpeg file used in the last test iteration (also the .prj was not deleted, but that was because of an unclosed channel against the prj file, which I fixed). Now the build is down to creating only a single un-removed temp file each build, the one that cannot be removed by gt2-image. Oh, for the curious, changes are here: http://www.nabble.com/svn---r24786---in-geotools-trunk-gt-modules-plugin-shapefile-src-test-java-org-geotools-data-shapefile%3A-.-indexed-tf3419862.html http://www.nabble.com/svn---r24788---in-geotools-trunk-gt-modules-plugin-shapefile-src%3A-main-java-org-geotools-index-rtree-cachefs-main-java-org-geotools-index-rtree-fs-test-java-org-geotools-data-shapefile-test-java-org-geotools-data-shapefile-indexed-test-java-org-geotools-i-tf3419979.html http://www.nabble.com/svn---r24789---geotools-trunk-gt-modules-plugin-image-src-test-java-org-geotools-gce-image-tf3420020.html http://www.nabble.com/svn---r24792---geotools-trunk-gt-modules-plugin-shapefile-src-test-java-org-geotools-data-shapefile-tf3421697.html http://www.nabble.com/svn---r24793---geotools-trunk-gt-modules-plugin-image-src-main-java-org-geotools-gce-image-tf3421708.html Cheers Andrea ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
