Closed glassfishrobot closed 15 years ago
Reported by najmi
lexi said: Hi Farrukh,
would you explain what you mean by the "best effort"? Like, "try copying that, if copying failed, it's no big deal, return null an go ahead"? Right now you can achieve this by providing your own copy builder when copying. I don't think there should be any boolean flag to indicate best-effort, this is clearly a task of copy builder to implement the copying strategy.
I can imaging something like BestEffortCopyBuilderWrapper which wraps another copy builder; if core copy builder throws exception when copying then BestEffortCopyBuilderWrapper returns some default value instead. Would this fit your needs?
najmi said: I agree with your assessment Lexi and will close this issue. Thanks.
lexi said: Closed.
Was assigned to lexi
This issue was imported from java.net JIRA JAXB2_COMMONS-15
Marked as incomplete on Sunday, November 23rd 2008, 3:34:31 pm
Related to issue: https://jaxb2-commons.dev.java.net/issues/show_bug.cgi?id=10
In my project the schemas often have xs:any that make generated classes throw java.lang.UnsupportedOperationException. In many cases it would be useful to have an option to copy the object on a best effort basis to copy all supported sub-objects. This is to request some operation like the following in CopyBuilder:
public Object copyTo(Object target, boolean bestEffort);
Environment
Operating System: All Platform: All
Affected Versions
[0.3]