You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Quinton McCombs <qm...@nequalsone.com> on 2002/11/23 00:02:26 UTC
Problem with getPrimaryKey() method on generated objects
I just ran into a small bug with the decoupled Torque.
Calling getPrimaryKey() on a generated object when your primary key is
an Integer type (probably others), a NullPointerException will be
thrown. Here is a sample stack trace:
java.lang.NullPointerException
at org.apache.torque.om.NumberKey.<init>(NumberKey.java:126)
at org.apache.torque.om.SimpleKey.keyFor(SimpleKey.java:104)
at
com.nequalsone.om.BaseNotification.getPrimaryKey(BaseNotification.java:684)
The problem is in several of the constructor in
o.a.torque.om.NumberKey. The parameter passed to the constructor is not
verified to be != null before a method is called on it.
See this issue for more details:
http://scarab.werken/scarab/issues/id/TDQS81
Also, I submitted a patch but the one attached to the issue is
incorrect. The correct version was sent to the turbine-dev list.