Yevgeny Shakhnovich wrote:
> Hi,
> I wonder if I hit a bug or this is in the accordance to the spec.
> I have class A extending class B. Class B has protected "afterUnmarshal"
> callback. Class A does not have such method. I was unmarshalling class A
> and expected the callback to be hit. It did not happen. Looking at the
> source, I realized why. To search for "afterUnmarshal" callback, the
> code uses "getDeclaredMethods" which returns only declared methods and
> not inherited ones.
> Of course, there is a simple workaround. Also, it is easy to "fix" JAXB
> code. My question is there any reason for not looking at the inheritance
> hierarchy or it is simply a bug.
My first reaction is that it sounds like a bug. How does Java
serialization callback methods behave with this regard?
If you have, say, readObject in the base class, does this method invoked
when you are processing derived types?
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com