summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian S. O'Neill <bronee@gmail.com>2009-01-01 17:01:50 +0000
committerBrian S. O'Neill <bronee@gmail.com>2009-01-01 17:01:50 +0000
commitd3893bcee8df9db78538e5eee23a608fa41cd77c (patch)
tree5027e2dcdb7fe7626c791c6bd2de230e733c7b5a /src
parent05951450cc7059a2fdf32b6c26a68408d52f8c33 (diff)
Concat exception messages at runtime to shrink constant pool.
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/amazon/carbonado/gen/StorableGenerator.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java b/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java
index f84748f..5e1d1fc 100644
--- a/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java
+++ b/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java
@@ -749,10 +749,9 @@ public final class StorableGenerator<S extends Storable> {
b.loadLocal(b.getParameter(0));
Label notNull = b.createLabel();
b.ifNullBranch(notNull, false);
- CodeBuilderUtil.throwException
+ CodeBuilderUtil.throwConcatException
(b, IllegalArgumentException.class,
- "Cannot set property \"" + property.getName() +
- "\" to null");
+ "Cannot set property \"", property.getName(), "\" to null");
notNull.setLocation();
} else {
// Don't invoke constraints if value is null.
@@ -816,9 +815,10 @@ public final class StorableGenerator<S extends Storable> {
} else {
Label notNull = b.createLabel();
b.ifNullBranch(notNull, false);
- CodeBuilderUtil.throwException
+ CodeBuilderUtil.throwConcatException
(b, IllegalArgumentException.class,
- "Non-nullable join property cannot be set to null");
+ "Non-nullable join property \"", property.getName(),
+ "\" cannot be set to null");
notNull.setLocation();
}