Thanks, fix checked in! On 2012-04-23 08:41, Joris Vanleene wrote:
see this line in org.h2.store.fs.FilePathDisk.java, it is useless shouldn't without assignment to in. My init sql script could not be found on the classpath and this is the reason there is a bug in this class.if (in == null) { Thread.currentThread().getContextClassLoader().getResourceAsStream(fileName); } public InputStream newInputStream() throws IOException { if (name.indexOf(':')> 1) { // if the : is in position 1, a windows file access is assumed: C:.. or D: if (name.startsWith(CLASSPATH_PREFIX)) { String fileName = name.substring(CLASSPATH_PREFIX.length()); if (!fileName.startsWith("/")) { fileName = "/" + fileName; } InputStream in = getClass().getResourceAsStream(fileName); if (in == null) { Thread.currentThread().getContextClassLoader().getResourceAsStream(fileName); } if (in == null) { throw new FileNotFoundException("resource " + fileName); } return in; } // otherwise an URL is assumed URL url = new URL(name); InputStream in = url.openStream(); return in; } FileInputStream in = new FileInputStream(name); IOUtils.trace("openFileInputStream", name, in); return in; }
-- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
