A Java bug

While debugging a former colleague code, a Java servlet running under TomCat, we found the following interesting bug (interesting because google is not reporting a lot of results!).

Whenever you create a URL object pointing to a normal file url (file://c:/document.xml) and try to call the openStream method, you get this very informative exception:

UnknownHostException: C

It seems that the URL object is picking the ftp transport to try and initialize the connection, and that’s where the bug is. Trying file:///c:/document.xml doesn’t work either, nor does file:///c|/document.xml. The correct solution is in fact:

file:c:/document.xml which is turned internally to file:/c:/document.xml

If anyone has an explanation on the reason of this weird behavior, I’d love to hear it!


What is all the frenzy with Rory?

I don’t get it… What is that with Rory attracting people like that? I can’t see anything interesting about an in-the-closet gay geek that draws stuff on a weblog…

For the stupid ones that really believed that… Well, get a life. Really. I love Rory, you should know better. Or don’t. Just quit reading blogs. NOW!


While we wait...

It’s terrible when you’re waiting behind the fax machine and nothing gets out… While waiting, I try to get busy with work; Which leads me to a question:

What the bloody hell were the visio creators thinking with their software stencils… Class diagrams are undoable without relying on UML, and that’s not a good thing. Wonder what tools Microsoft use to release their nice drawings. Oh well, need to stand up and go check the fax machine again…