提交 809d44cf authored 作者: Thomas Mueller's avatar Thomas Mueller

The method org.h2.expression.Function.getCost could throw a NullPointException.

上级 ead2f7ad
...@@ -18,7 +18,8 @@ Change Log ...@@ -18,7 +18,8 @@ Change Log
<h1>Change Log</h1> <h1>Change Log</h1>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li>Storing LOBs in separate files (outside of the database) is no longer supported for new databases. <ul><li>The method org.h2.expression.Function.getCost could throw a NullPointException.
</li><li>Storing LOBs in separate files (outside of the database) is no longer supported for new databases.
</li><li>Lucene 2 is no longer supported. </li><li>Lucene 2 is no longer supported.
</li><li>Fix bug in calculating default MIN and MAX values for SEQUENCE </li><li>Fix bug in calculating default MIN and MAX values for SEQUENCE
</li></ul> </li></ul>
......
...@@ -2388,8 +2388,10 @@ public class Function extends Expression implements FunctionCall { ...@@ -2388,8 +2388,10 @@ public class Function extends Expression implements FunctionCall {
public int getCost() { public int getCost() {
int cost = 3; int cost = 3;
for (Expression e : args) { for (Expression e : args) {
if (e != null) {
cost += e.getCost(); cost += e.getCost();
} }
}
return cost; return cost;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论