You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 24, 2018. It is now read-only.
There is a request for JAXB 2.0 to no longer require that
the factory method signatures in ObjectFactory throw the
checked exception JAXBException.
Rationale:
In Java, creating new instances of objects do not fail with a
checked exception. This is because:
it's not hard to imagine how many try-catch blocks you'll
be writing if every "new" throws an exception.
unlike errors like I/O problems, which you can handle gracefully,
there's really nothing you can do to recover from failing to
create new instances in memory.
Specific request is to change following text in Section 5.2 of JAXB 2.0 Early
Draft
A public class ObjectFactory contains:
An instance factory method signature for each Java content within the package.
Given Java content interface named Foo, here is the derived factory method:
public Foo createFoo() throws JAXBException;
An element instance factory method signature for each bound element declaration.
There is a request for JAXB 2.0 to no longer require that
the factory method signatures in ObjectFactory throw the
checked exception JAXBException.
Rationale:
In Java, creating new instances of objects do not fail with a
checked exception. This is because:
be writing if every "new" throws an exception.
there's really nothing you can do to recover from failing to
create new instances in memory.
Specific request is to change following text in Section 5.2 of JAXB 2.0 Early
Draft
A public class ObjectFactory contains:
An instance factory method signature for each Java content within the package.
Given Java content interface named Foo, here is the derived factory method:
public Foo createFoo() throws JAXBException;
An element instance factory method signature for each bound element declaration.
public IXmlElement createFoo(T elementValue)
throws JAXBException;
Dynamic instance factory allocator method signature:
public Object newInstance(Class javaContentInterface)
throws JAXBException;
Change is to delete "throws JAXBException" from above factory method
signatures of ObjectFactory.
Environment
Operating System: All
Platform: All
Affected Versions
[2.0 draft]
The text was updated successfully, but these errors were encountered: