db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dongsheng Song" <egcs1...@msn.com>
Subject [BUG] Torque3.0: Null pointer unchecked
Date Wed, 30 Apr 2003 07:19:21 GMT
Torque generate 5 java class for a table 'Group',

    BaseGroupPeer.java, GroupPeer.java, BaseGroup.java, Group.java, GroupMapBuilder.java

In GroupMapBuilder.doBuild, Torque hard code a line like 
    dbMap = Torque.getDatabaseMap("foresee");

But not check dbMap whether or not null !
I think it should be:

    dbMap = Torque.getDatabaseMap(GroupPeer.DATABASE_NAME);
    if (dbMap == null)
        throw new TorqueException("can't get database map for " + GroupPeer.DATABASE_NAME);



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message