From dbcdfb9ff98a38845ce0e89daf3a6b848e682281 Mon Sep 17 00:00:00 2001 From: "Kevin W. Sutter" Date: Mon, 4 Dec 2006 14:43:30 +0000 Subject: [PATCH] Include the original exception that caused the ClassFormatError to be thrown. git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@482191 13f79535-47bb-0310-9956-ffa450edef68 --- .../openjpa/lib/meta/ClassAnnotationMetaDataFilter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ClassAnnotationMetaDataFilter.java b/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ClassAnnotationMetaDataFilter.java index ba40d47f7..e0a6be1f0 100644 --- a/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ClassAnnotationMetaDataFilter.java +++ b/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ClassAnnotationMetaDataFilter.java @@ -83,7 +83,9 @@ public class ClassAnnotationMetaDataFilter implements MetaDataFilter { idx += 4 + table.readInt(idx); } } catch (ArrayIndexOutOfBoundsException e) { - throw new ClassFormatError(rsrc.getName()); + Error cfe = new ClassFormatError(rsrc.getName()); + cfe.initCause(e); + throw cfe; } return false; }