Update of 
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/entity/resources
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25953/modules/ejb/src/xdoclet/modules/ejb/entity/resources

Modified Files:
        valueobject.xdt 
Log Message:
prevent NullPointerException when primaryKey is null (XDT-1385). Thanks to Ari 
Miller for the patch.

Index: valueobject.xdt
===================================================================
RCS file: 
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/entity/resources/valueobject.xdt,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -r1.34 -r1.35
*** valueobject.xdt     9 Apr 2005 07:49:42 -0000       1.34
--- valueobject.xdt     9 May 2005 21:04:06 -0000       1.35
***************
*** 168,172 ****
          <XDtEjbPk:ifDoesntHavePrimkeyField>

                <XDtEjbPk:ifIsPkField>

!       primaryKey.<XDtMethod:setterMethod/>(<XDtMethod:propertyName/>);

                </XDtEjbPk:ifIsPkField>

          </XDtEjbPk:ifDoesntHavePrimkeyField>

--- 168,176 ----
          <XDtEjbPk:ifDoesntHavePrimkeyField>

                <XDtEjbPk:ifIsPkField>

!               // Set can be called in a constructor, before the primary key is

!               // initialized

!               if (primaryKey != null) {

!                       
primaryKey.<XDtMethod:setterMethod/>(<XDtMethod:propertyName/>);

!               }

                </XDtEjbPk:ifIsPkField>

          </XDtEjbPk:ifDoesntHavePrimkeyField>




-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
xdoclet-devel mailing list
xdoclet-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to