Browse Source

Fixes #657 (throws if setArgs == null)

svn changeset:4365/svn branch:trunk
tags/6.7.0.beta1
Marc Englund 16 years ago
parent
commit
ce974dad3e
1 changed files with 9 additions and 4 deletions
  1. 9
    4
      src/com/itmill/toolkit/data/util/MethodProperty.java

+ 9
- 4
src/com/itmill/toolkit/data/util/MethodProperty.java View File

@@ -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…
Cancel
Save