db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Allen <...@mojavelinux.com>
Subject Database.java source code bug
Date Sat, 01 Mar 2003 17:03:52 GMT
I encountered an error when running

 ant -f build-torque.xml

only to discover a NullPointerException in Database.java:468.  Upon
futhur research, I discovered the following, blatantly obvious bug
in the sourcecode when reporting a foreign key error around line 466.

org.apache.torque.engine.database.model.Database.doFinalInitialization

 if (foreign == null)
 {
     System.out.println("ERROR!! Attempt to set foreign"
             + " key to nonexistent column, "
             + foreign.getName() + ", in table, "
             + foreignTable.getName() + "!");
 }

foreign.getName() will throw a null pointer if it is in fact
null...not a good debugging routine there.

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <dan@mojavelinux.com>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Hey, somebody, sometime, somewhere, said something I think that 
just maybe might have been true but I think that I maybe 
didn't like it. 
 
F^CK IT, I'm suing everybody. 
 -- slashdot member in response to 
    petswarehouse.com sueing google.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

Mime
View raw message