From 277454fe7819697ff9a9ea6e25edcaa34c6a8e20 Mon Sep 17 00:00:00 2001 From: mjohnson Date: Fri, 21 Mar 2008 01:47:46 +0000 Subject: [PATCH] Allow a null FieldDescriptor array so that a dummy FieldMask can be created which let's anything go git-svn-id: https://samskivert.googlecode.com/svn/trunk@2279 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- src/java/com/samskivert/jdbc/jora/FieldMask.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java/com/samskivert/jdbc/jora/FieldMask.java b/src/java/com/samskivert/jdbc/jora/FieldMask.java index ff899732..e4122fdd 100644 --- a/src/java/com/samskivert/jdbc/jora/FieldMask.java +++ b/src/java/com/samskivert/jdbc/jora/FieldMask.java @@ -3,7 +3,7 @@ // // samskivert library - useful routines for java programs // Copyright (C) 2001-2007 Michael Bayne -// +// // This library is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License as published // by the Free Software Foundation; either version 2.1 of the License, or @@ -54,7 +54,7 @@ public class FieldMask { // create a mapping from field name to descriptor index _descripMap = new HashMap(); - int dcount = descrips.length; + int dcount = (descrips == null ? 0 : descrips.length); for (int i = 0; i < dcount; i++) { _descripMap.put(descrips[i].field.getName(), Integer.valueOf(i)); }