db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Emminger <e...@ericemminger.com>
Subject Re: Database.java source code bug
Date Mon, 03 Mar 2003 16:51:40 GMT
Dan

Thanks for finding this!

If you'd like, you could create a patch and contribute it to the Torque 
project! Help is always welcome!

Eric

Dan Allen wrote:
> 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
> 


Mime
View raw message