From: Peter B. (JIRA) <ji...@co...> - 2007-07-17 18:35:11
|
DataStoreFinder hides exception from DataStoreFactory.createDataStore(...) -------------------------------------------------------------------------- Key: GEOT-1403 URL: http://jira.codehaus.org/browse/GEOT-1403 Project: GeoTools Issue Type: Bug Components: core main Reporter: Peter Bolla Assignee: Jody Garnett Attachments: DataStoreFinder.patch The problem is in org.geotools.data.DataStoreFinder and org.geotools.data.FileDataStoreFinder. In the SVN HEAD version of them the whole canProcess(...), createDataStore(...) cycle is in a try {} catch(Throwable t) block. This way if a DataStore can handle a type of database, but fails to open it (e.g. corrupt db file) no exception is thrown, only a debug message is logged. This contradicts with the javadoc, which says that an IOException is thrown "If a suitable loader can be found, but it can not be attached to the specified resource without errors." And even the comment in the catch block states that it "Protect against DataStores that don't carefully code canProcess". I've already posted this bug on geotools-user in may, and Jody responded to it positively, but since then it got forgotten. I also have a patch for DataStoreFinder, FileDataStoreFinder may be modified the same way. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |