From 98660bef8667d75a798b67f073703cd9ec051e9c Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Thu, 24 May 2007 21:15:41 +0000 Subject: Fix bug which would throw spurious IllegalArgumentException from StorableGenerator. --- src/main/java/com/amazon/carbonado/gen/StorableGenerator.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main/java/com/amazon/carbonado/gen') diff --git a/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java b/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java index 0fa8708..5f473cb 100644 --- a/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java +++ b/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java @@ -1885,7 +1885,7 @@ public final class StorableGenerator { addAltKeyMethods: for (int i=0; i> altProps = - new HashMap>(); + new LinkedHashMap>(); StorableKey altKey = mInfo.getAlternateKey(i); @@ -1905,7 +1905,7 @@ public final class StorableGenerator { // Define protected isRequiredDataInitialized method. defineIsRequiredDataInitialized: { Map> requiredProperties = - new HashMap>(); + new LinkedHashMap>(); for (StorableProperty property : mAllProperties.values()) { if (!property.isDerived() && @@ -2686,7 +2686,7 @@ public final class StorableGenerator { b.returnValue(TypeDesc.BOOLEAN); } - private int findPropertyOrdinal(StorableProperty property) { + private int findPropertyOrdinal(StorableProperty property) { int ordinal = 0; for (StorableProperty p : mAllProperties.values()) { if (p == property) { @@ -2694,7 +2694,8 @@ public final class StorableGenerator { } ordinal++; } - throw new IllegalArgumentException(); + throw new IllegalArgumentException + ("Unable to find property " + property + " in " + mAllProperties); } /** -- cgit v1.2.3