Procházet zdrojové kódy

Fixes #657 (throws if setArgs == null)

svn changeset:4365/svn branch:trunk
tags/6.7.0.beta1
Marc Englund před 16 roky
rodič
revize
ce974dad3e

+ 9
- 4
src/com/itmill/toolkit/data/util/MethodProperty.java Zobrazit soubor

@@ -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

Načítá se…
Zrušit
Uložit