I fixed the null pointer exception in my pluggable renderer code. (I
fixed it in the JUnit test of the RendererFactory class. I still need
to test the fix in an actual build of OpenJUMP.)

I implemented so many little fixes when writing the first 3 JUnit
tests that I don't even know where the null pointer exception was
coming from. I just know that one of my changes corrected it.

This has taught me to important lessons:

[1] Never try to debug code with out proper unit tests.
[2] Always test the simplest methods of a class first. Fixes resulting
from the tests results of simple methods will result in the tests of
more comlex methods in the class passing. (I sort of did this
backawards.)

I should finish the remaining unit tests of the RendererFactory class
the first part of next week. (The unit tests for the
RegularLayerRendererTool are already complete.) When these unit tests
are done I will try out the tested code in an actual build.

This means that I am much closer to testing both the pluggable
rendering system and the plug-in dependency system with the "free form
labels" plug-in.

I just wanted to share my excitement this morning. That was, after
all, the nastiest bug I've ever had to track down in my limited Java
programming experience.

The Sunburned Surveyor

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jump-pilot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to