classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: please test: XMLEncoder patch - version 2


From: Mark Wielaard
Subject: Re: please test: XMLEncoder patch - version 2
Date: Mon, 09 Jan 2006 22:46:33 +0100

Hi Roman,

On Mon, 2006-01-09 at 22:35 +0100, Roman Kennke wrote:
> > I was hoping that we could use some instanceof trick since all the
> > "special" delegates are for classes that implement java.util.Map. Am I
> > right this is indeed the case for all these classes? If so maybe you
> > could special case when a class has a null classloader (bootstrap
> > classloader) and is an instanceof java.util.Map?
> 
> How can using instanceof solve this problem? I mean, if we write x
> instanceof UIDefaults, the class UIDefaults is still referenced and
> needs to be there. You can't compile that with this class missing. Or am
> I missing something here?

If I am seeing it correctly all "special classes" are only special
because they implement java.util.Map. So we would write:

  // special case bootstrap classes that implement Map
  if (x.getClassLoader() == null && x instanceof java.util.Map)

That depends on whether or not we actually want all these classes to us
the special MapPersistenceDelegate.

Cheers,

Mark
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]