提交 60222856 authored 作者: noelgrandin's avatar noelgrandin

Fix to org.h2.util.ScriptReader when handling unclosed block comments.

上级 b2f81257
......@@ -73,6 +73,7 @@ Change Log
in order to make Websphere happy.
</li><li>Make Server#openBrowser respect the $BROWSER environment variable. Add "chromium" to the list of browsers tried.
Patch from Felix Kaiser.
</li><li>Fix to org.h2.util.ScriptReader when handling unclosed block comments.
</li></ul>
<h2>Version 1.3.173 (2013-07-28)</h2>
......
......@@ -140,7 +140,7 @@ public class ScriptReader {
c = read();
if (c == '*') {
// block comment
startRemark(false);
startRemark(true);
while (true) {
c = read();
if (c < 0) {
......
......@@ -186,6 +186,12 @@ public class TestScriptReader extends TestBase {
assertEquals(null, source.readStatement());
source.close();
// check handling of unclosed block comments
s = "/*xxx";
source = new ScriptReader(new StringReader(s));
assertEquals("/*xxx", source.readStatement());
assertTrue(source.isBlockRemark());
source.close();
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论