From db174a951274655dd18c63ad7d36a75124949e01 Mon Sep 17 00:00:00 2001 From: "A. Abram White" Date: Fri, 8 Dec 2006 21:54:27 +0000 Subject: [PATCH] Better error message when attempting to proxy final class. git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@484815 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/openjpa/util/ProxyManagerImpl.java | 2 +- .../main/resources/org/apache/openjpa/util/localizer.properties | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyManagerImpl.java b/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyManagerImpl.java index a9b649ef7..66700520f 100644 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyManagerImpl.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyManagerImpl.java @@ -431,7 +431,7 @@ public class ProxyManagerImpl */ private static void assertNotFinal(Class type) { if (Modifier.isFinal(type.getModifiers())) - throw new UnsupportedException(_loc.get("proxy-final", type)); + throw new UnsupportedException(_loc.get("no-proxy-final", type)); } /** diff --git a/openjpa-kernel/src/main/resources/org/apache/openjpa/util/localizer.properties b/openjpa-kernel/src/main/resources/org/apache/openjpa/util/localizer.properties index 1c797a83c..66d363318 100644 --- a/openjpa-kernel/src/main/resources/org/apache/openjpa/util/localizer.properties +++ b/openjpa-kernel/src/main/resources/org/apache/openjpa/util/localizer.properties @@ -43,6 +43,8 @@ opt-lock-nested: Optimistic locking errors were detected when \ the nested throwables array contains a failed object representing \ a concurrently modified object. bad-array: Unable to copy array: {0}. +no-proxy-final: Unable to create a second class object proxy for final class \ + "{0}". no-proxy-intf: Unable to create a second class object proxy for interface \ "{0}". No corresponding concrete types are known. no-proxy-abstract: Unable to create a second class object proxy for abstract \