瀏覽代碼

Fixes #657 (throws if setArgs == null)

svn changeset:4365/svn branch:trunk
tags/6.7.0.beta1
Marc Englund 16 年之前
父節點
當前提交
ce974dad3e
共有 1 個文件被更改,包括 9 次插入4 次删除
  1. 9
    4
      src/com/itmill/toolkit/data/util/MethodProperty.java

+ 9
- 4
src/com/itmill/toolkit/data/util/MethodProperty.java 查看文件

@@ -461,10 +461,15 @@ public class MethodProperty implements Property {
"Property GET-method cannot not be null: " + type);
}

if (setMethod != null
&& (setArgumentIndex < 0 || setArgumentIndex >= setArgs.length)) {
throw new IndexOutOfBoundsException(
"The setArgumentIndex must be >= 0 and < setArgs.length");
if (setMethod != null) {
if (setArgs == null) {
throw new IndexOutOfBoundsException(
"The setArgs can not be null");
}
if (setArgumentIndex < 0 || setArgumentIndex >= setArgs.length) {
throw new IndexOutOfBoundsException(
"The setArgumentIndex must be >= 0 and < setArgs.length");
}
}

// Gets the return type from get method

Loading…
取消
儲存