From ce974dad3e0153b71130744de6a5f7466a13d8c3 Mon Sep 17 00:00:00 2001 From: Marc Englund Date: Wed, 7 May 2008 08:43:11 +0000 Subject: [PATCH] Fixes #657 (throws if setArgs == null) svn changeset:4365/svn branch:trunk --- .../itmill/toolkit/data/util/MethodProperty.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/com/itmill/toolkit/data/util/MethodProperty.java b/src/com/itmill/toolkit/data/util/MethodProperty.java index 04ed811b63..6bedad2729 100644 --- a/src/com/itmill/toolkit/data/util/MethodProperty.java +++ b/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 -- 2.39.5