From what you've said, sounds like a JDK bug of some sort, yes. If it worked in 1.5.0_01 but not 1.5.0_04, it may be worthwhile for you to try intermediate versions as well. You can find them in Sun's
product downloads archive. I'd switch to the most recent JDK version that doesn't exhibit this problem. And search the bug database for reports of similar trouble. If you can't find an existing report that matches what you're seeing, then you'll want to enter a new bug reprot to make Sun aware of the issue. However to do this you will need a test case that you can submit to Sun.