Hi Roman,
the PDs have to be registered to make out-of-the-box encoders (new
XMLEncoder(...)) be able to process instances of those classes. However: If you
want to split Swing out of the class library there is no point in trying to
register a PD for them since the class isnt there anyway.

I prepare a patch that will resolve this issue by using Class.forName() which is
allowed to fail for such classes.

Btw: Currently the encoder relies on the StAX implementation. If someone decides
to rip that out one has to provide an alternative gnu.java.beans.encoder.Writer
implementation.

cya
Robert

Roman Kennke wrote:
> Hi Robert,
> 
> Is it really necessary to directly reference all those classes in
> java.beans.Encoder.setupDefaultPersistenceDelegates()? Can you explain
> what this method does and why the encoder won't work without these
> persistent delegates? I am asking, because we had discussions about
> breaking down the class library in the past, and pulling in e.g. Swing
> by dependencies in java.beans looks ugly to me. Can the same effect be
> achieved without directly refererring to those classes?
> 
> Cheers,
> /Roman

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Classpath mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath

Reply via email to