Monday, April 14, 2008

Web Service Bug

I found a small bug in the web service component that I referenced in my last post. It involves casting a String to Boolean. The code tries to convert a string to boolean with a simple Boolean cast. However, the following call Boolean("false") would actually return true. The reason is that any nonempty string returns true. The only time a string would return false is if it were null or empty (""). Therefor, to fix the bug, open and change the case on line 155 to the following:

case "boolean":
return true;
else return false;


Hope that helps.


Anonymous said...

Thought you should know: I applied the fix you suggested :)

Ickydime said...

Very cool. Thanks for the update.

Have you gotten into the recursive calls yet? I ended up implementing a quick fix to get through my current project. Seems to work fine, but not sure if it would suit everyone's needs.

Keep me posted, I'm very interested in the project.