Closed glassfishrobot closed 15 years ago
Reported by najmi
lexi said: UOE is thrown if cloning using the clone() method for some reason fails. I've changed the code to report the error more verbously:
if (object instanceof Cloneable) { try { final Method cloneMethod = object.getClass().getMethod("clone", (Class[]) null); if (cloneMethod.isAccessible())
{ return cloneMethod.invoke(object, (Object[]) null); }
else
{ throw new UnsupportedOperationException( "Could not clone object [" + object + "].", new CloneNotSupportedException( "Object class [" + object.getClass() + "] implements java.lang.Cloneable interface, " + "but clone() method is not accessible. " + "By convention, classes that implement java.lang.Cloneable " + "should override java.lang.Object.clone() method (which is protected) " + "with a public method.")); }
} catch (Exception ex)
{ throw new UnsupportedOperationException( "Could not clone the object [" + object + "] as invocation of the clone() method has thrown an exception.", ex); }
}
The fix will be available in 0.3.1.
najmi said: Created an attachment (id=8) HJ3 Generated source file for AnyValueType in rim.xsd
lexi said: Done.
File: AnyValueType.java Attached By: najmi
Was assigned to lexi
This issue was imported from java.net JIRA JAXB2_COMMONS-10
Marked as fixed on Friday, November 21st 2008, 8:48:19 pm
Currently it just says java.lang.UnsupportedOperationException and not what exactly is unsupported. Need to use debugger to find out.
Environment
Operating System: All Platform: All
Affected Versions
[0.3]