View Full Version : Function Bug

06-11-2002, 03:13 PM
The ItemSumFunction has a bug in the constructor which takes a String param. Not all of the instance variables are being set like in the default constructor. This leads to a NullPointerException during itemsAdvanced for the datasource variable.

Also, I was only able to find this when I turned logging on. Somewhere in the code, the exception was being swallowed and I never knew why I wasn't getting values. I think NullPointerExceptions should not be swallowed by logging being on or off. For now, I'll have to turn logging on. Just my 2 cents.

BTW, are you planning on converting to jdk1.4 logging or to keep using your own?


06-11-2002, 06:30 PM

yes, the functions was constructor was wrong. Its fixed in the cvs. I changed logging to be enabled by default, it can be disabled by setting the SystemProperty "com.jrefinery.report.NoDefaultDebug" to "true".

Logging will remain our own implementation, forcing all users to use JDK1.4 is not yet a good idea and the logging interface is flexible enough to cope with any logging system. To adept it a different logging system, just implement the "LogTarget"-Interface and add this target to the Log-system using Log.addTarget(target).

Have more fun,
said Thomas