[Ikvm-commit] ikvm/openjdk/ikvm/internal AnnotationAttributeBase.java, 1.3, 1.4
Brought to you by:
jfrijters
From: Jeroen F. <jfr...@us...> - 2010-12-07 06:47:38
|
Update of /cvsroot/ikvm/ikvm/openjdk/ikvm/internal In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv18231/openjdk/ikvm/internal Modified Files: AnnotationAttributeBase.java Log Message: Added support for encoding incorrect annotation values and reporting the exception back when the annotation is queried. Removed old (GNU Classpath based) version of AnnotationAttributeBase.java. Index: AnnotationAttributeBase.java =================================================================== RCS file: /cvsroot/ikvm/ikvm/openjdk/ikvm/internal/AnnotationAttributeBase.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AnnotationAttributeBase.java 18 Sep 2007 13:35:20 -0000 1.3 --- AnnotationAttributeBase.java 7 Dec 2010 06:47:30 -0000 1.4 *************** *** 345,348 **** --- 345,362 ---- throws IllegalAccessException { + if (obj instanceof Object[] && CIL.unbox_byte(((Object[])obj)[0]) == '?') + { + Throwable t; + try + { + Object[] error = (Object[])obj; + t = (Throwable)Class.forName((String)error[1]).getConstructor(String.class).newInstance(error[2]); + } + catch (Exception x) + { + t = x; + } + sun.misc.Unsafe.getUnsafe().throwException(t); + } if (type == Byte.TYPE) { |