I know this doesn't really answer your question, but if you switch your trim() calls to StringUtils.trim() then you avoid a possible NullPointerException since the StringUtils version is nullsafe.
-Shawn -----Original Message----- From: Chetan [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 25, 2006 4:50 AM To: [email protected] Subject: Problem with Result Set returning null instead of Empty String Hi, I have a web application running on Tomcat 4.0. In it i have implemented by own Connection Pool. Now im trying to use the DBCP connection broker to handle message pools. I have managed in doing so but ther's just one problem: Earlier in my code, whenever i was doing a resultSet.getString('some column name'), the return value would be an empty string ('') in case the column in the database was null. However, after using DBCP, similar statements return null and since in a lot of places, i have done operations such as trim() etc on these returned Strings, i am getting null pointer exceptions all over the place! Is there any way by which i could make the DBCP connection broker return an empty string instead of a null so that i dont need to make changes in numerous places in my application to handle the null pointer case ? Thanks and Regards, Chetan Arora --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
