Source:
<code>public void loadSchemaWithFiltering(Reader reader, final Database db, final DdlProceduresToLoad whichProcs, SQLParser.FileInfo fileInfo) throws VoltCompiler.VoltCompilerException { final LineReaderAdapter lineReader = new LineReaderAdapter(reader); DDLParserCallback callback = new DDLParserCallback() { @Override public void statement(String statement, int lineNum) throws VoltCompiler.VoltCompilerException { try { if (statement == null || statement.trim().isEmpty()) { return; } doExecuteStatement(statement.trim() + ";", lineNum); } catch (Exception e) { throw m_compiler.new VoltCompilerException(e); } } @Override public void batch(String batch, int batchEndLineNumber) throws VoltCompiler.VoltCompilerException { try { String[] parts = batch.split(";"); int currLine = batchEndLineNumber - parts.length; for (String s : parts) { if (!s.trim().isEmpty()) { doExecuteStatement(s.trim() + ";", currLine++); } } } catch (Exception e) { throw m_compiler.new VoltCompilerException(e); } } private void doExecuteStatement(String statement, int lineNum) throws VoltCompiler.VoltCompilerException { if (statement.startsWith("LOAD")) { return; } DDLStatement stmt = new DDLStatement(statement, lineNum); executeStatement(db, whichProcs, stmt); } }; try { SQLCommand.executeScriptFromReader(fileInfo, lineReader, callback); } catch (Exception e) { throw m_compiler.new VoltCompilerException(e); } try { <START> reader.close(); <END> } catch (IOException e) { throw m_compiler.new VoltCompilerException("Error closing schema file"); } m_tracker.addExtraClasses(m_classMatcher.getMatchedClassList()); m_classMatcher.clear(); }</code><technical_language>is reader closed if opened here? opened</technical_language>

Target:
public void loadSchemaWithFiltering(Reader reader, final Database db, final DdlProceduresToLoad whichProcs, SQLParser.FileInfo fileInfo) throws VoltCompiler.VoltCompilerException { final LineReaderAdapter lineReader = new LineReaderAdapter(reader); DDLParserCallback callback = new DDLParserCallback() { @Override public void statement(String statement, int lineNum) throws VoltCompiler.VoltCompilerException { try { if (statement == null || statement.trim().isEmpty()) { return; } doExecuteStatement(statement.trim() + ";", lineNum); } catch (Exception e) { throw m_compiler.new VoltCompilerException(e); } } @Override public void batch(String batch, int batchEndLineNumber) throws VoltCompiler.VoltCompilerException { try { String[] parts = batch.split(";"); int currLine = batchEndLineNumber - parts.length; for (String s : parts) { if (!s.trim().isEmpty()) { doExecuteStatement(s.trim() + ";", currLine++); } } } catch (Exception e) { throw m_compiler.new VoltCompilerException(e); } } private void doExecuteStatement(String statement, int lineNum) throws VoltCompiler.VoltCompilerException { if (statement.toUpperCase().startsWith("LOAD")) { return; } DDLStatement stmt = new DDLStatement(statement, lineNum); processVoltDBStatements(db, whichProcs, stmt); } }; try { SQLCommand.executeScriptFromReader(fileInfo, lineReader, callback); } catch (Exception e) { throw m_compiler.new VoltCompilerException(e); } finally { lineReader.close(); } m_tracker.addExtraClasses(m_classMatcher.getMatchedClassList()); m_classMatcher.clear(); }