From d3893bcee8df9db78538e5eee23a608fa41cd77c Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Thu, 1 Jan 2009 17:01:50 +0000 Subject: Concat exception messages at runtime to shrink constant pool. --- src/main/java/com/amazon/carbonado/gen/StorableGenerator.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main/java/com/amazon/carbonado') 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 { 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 { } 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(); } -- cgit v1.2.3