dev@glassfish.java.net

Issue 257

From: Nathaniel Stoddard <nathaniel.stoddard_at_gmail.com>
Date: Wed, 15 Feb 2006 10:14:49 -0500

This is related to issue 257 (entity-persistence related). (Sorry if
this is going to the wrong place.) I was going to add a comment to
the existing issue, but couldn't figure out how or if it was possible.
 The issue says that a NullPointerException is being caused by
abstract classes that extend concrete classes. The abstract class
doesn't provide a @DiscriminatorValue and the code throws the
exception when it expects one.

I believe the issue goes farther than that. The Javadoc for the
function throwing the error says that a DiscriminatorValue will
default to the class name if the annotation isn't present. But it
doesn't, ergo the NullPointerException.

I think this is really two issues:

1. The code should default the DiscriminatorValue to the class name
as it says it will.
2. Abstract classes shouldn't require (or default to class name) the
DiscriminatorValue at all. This may not even be an issue if #1 is
fixed.

What do you folks think?