openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From curti...@apache.org
Subject svn commit: r1392424 - in /openjpa/trunk/openjpa-kernel/src/main: java/org/apache/openjpa/enhance/AsmAdaptor.java resources/org/apache/openjpa/enhance/localizer.properties
Date Mon, 01 Oct 2012 16:18:54 GMT
Author: curtisr7
Date: Mon Oct  1 16:18:54 2012
New Revision: 1392424

URL: http://svn.apache.org/viewvc?rev=1392424&view=rev
Log:
OPENJPA-2171: Fix ASM static init exception text.

Modified:
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/AsmAdaptor.java
    openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/enhance/localizer.properties

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/AsmAdaptor.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/AsmAdaptor.java?rev=1392424&r1=1392423&r2=1392424&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/AsmAdaptor.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/AsmAdaptor.java
Mon Oct  1 16:18:54 2012
@@ -31,6 +31,8 @@ import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
 import java.net.URLDecoder;
 
+import org.apache.openjpa.lib.util.Localizer;
+
 /**
  * Use ASM to add required StackMapTable attribute to the byte code generated by
  * Serp.
@@ -42,6 +44,8 @@ import java.net.URLDecoder;
  * At last we try to use the shaded version from Spring.
  */
 public final class AsmAdaptor {
+    private static final Localizer _loc = Localizer.forPackage(AsmAdaptor.class);
+    
     private static final int Java7_MajorVersion = 51;
 
     private static Class<?> cwClass;
@@ -66,7 +70,7 @@ public final class AsmAdaptor {
             classWriterConstructor = cwClass.getConstructor(int.class);
             classWritertoByteArray = cwClass.getMethod("toByteArray");
         } catch (Exception e) {
-            throw new IllegalStateException("can't find all needed ASM stuff", e);
+            throw new IllegalStateException(_loc.get("static-asm-exception").getMessage(),
e);
         }
     }
 

Modified: openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/enhance/localizer.properties
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/enhance/localizer.properties?rev=1392424&r1=1392423&r2=1392424&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/enhance/localizer.properties
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/enhance/localizer.properties
Mon Oct  1 16:18:54 2012
@@ -219,3 +219,4 @@ set-field: Error while setting value {2}
 set-method: Error while setting value {2} of {3} by setter method {1} of instance {0} by
reflection.
 down-level-enhanced-entity: The Entity "{0}" was enhanced at level "{1}", but the current
level of enhancement is \
 "{2}". 
+static-asm-exception: Encountered an unexpected exception while loading ASM.



Mime
View raw message