OK, after one of my younger cohorts tried to create an instance of a
CMP entity whose fields were all private (at least he understands
encapsulation!) leading to a mysterious NPE, I ran across the
following code in CMPFieldMetaData:

   catch (NoSuchFieldException e)
   {
     // we can have a private attribute, then we will use fieldName
     // to find the get/set methods, but still have to set jdbcType/SQLType
     // but can not yet do it sowe have to set field to null so that
     // getJDBCType will not use the parent Field to find the types
     field = null;
     return null;
   }

I've got two problems with this:
1. This violates the spec. No huge deal, in my book, but...
2. The following code in CMPFieldMetaData:

   if (!isNested())
   {
     return getField().get(instance);
   }

Blows Chow all over the place.


I'm calling this a buglet because it only sucks when you have a
non-compliant bean. But then the fact that every bloody log write
in JAWS has been made 'debug' even where they are obviously error
conditions and very few of the exceptions propogate sufficient
information (which is tough to do anyway from 'catch (Exception)')
makes it really suck when you hit it. There are a lot of error
conditions in JAWS that really suck when you hit them with DEBUG
logging off.

But. Should I fix this (and other issues) and if I fix this should I
port up to the 3.0 code? Is JAWS still used at all in 3.0, or is it
entirely replaced by Dain's CMP?

My fix for this would probably be to simply make it enforce the spec
and report a sensible DeploymentException telling the bean developer
what's wrong, but that does seem out of character for JAWS (telling
the developer what went wrong). OK, just so nobody has to remind me,
I did have a bit to do with the 2.4 JAWS, but if you can't look at
your own work from 9 months ago and bitch about it, what _can_ you
bitch about?

Opinions?

thanks all,
danch


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to