?

Log in

No account? Create an account
   Journal    Friends    Archive    Profile    Memories
 

How to create lots of warnings, and then frustration - RonO's Ramblings

Dec. 13th, 2008 04:51 pm How to create lots of warnings, and then frustration

Today, prompted by dave_ifversen acquiring a badge printer that might (and it sounds like should) be able to print both the front and back of the DucKon badges, I have been making some updates to the DucKon registration program. My first step, however, produced hundreds of warnings that I'm ignoring for now.

For the last several years, I've kept the DucKon program compatible with Java 1.4 to avoid the need for upgrading the computers to Java 1.5 (or Java 5.0 as it is now known). However, I decided that I wanted to use generics since I've gotten used to using them in most case otherwise. This required that I change the compiler settings in eclipse (which I use as a Java IDE and build environment) to support Java 5.0. As soon as I did this every instance where I access a class that supports generics got a warning message because I wasn't using them. Perhaps I'll go back at some point and clean them up. Of course before I can do this to far, I need to make sure that the server running the website that also has this code (but doesn't use the class I updated) for the web registration stuff is also updated to use Java 5.0.

Having decided to ignore the warnings, I proceeded to update the code to support printing two sided badges. This started out going way quicker and smoother than I'd feared. It all worked until I actually tried to start printing. Then I started getting a NullPointerException being issued from library code. Over the next few hours, with some breaks in the middle for shopping and other stuff, I tried various different things. I probably ended up improving the code, or possibly fixing the next bug I would have seen in the process. Then I finally had basically given up and was going to take a whole different approach to how I was going to print the multiple page versions when I discovered that I had missed a chunk of code when I created a new constructor method for a class that I got from someone else {it is documented to the original source}. This missing code left a very neccessary class undefined, thus null, and was the source of my exception. Once I copied the rest of the other constructor into my new constructor everything worked perfectly.

Now I need to get the programs to Dave, and he needs to get the printer in basic function, and we can see if my approach actually works. Luckily, we have until mid-May to get this all worked out.

Leave a commentPrevious Entry Share Next Entry