db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Rall <...@finemaltcoding.com>
Subject Re: JDBC Conversion Problem
Date Fri, 27 Jun 2003 18:27:19 GMT
"Henning P. Schmiedehausen" <hps@intermeta.de> writes:

[I didn't write this]
> >> 330                 if (defValue != null)
> >>  
> >> I would suggest the following to correct the last issue : 
> >>  
> >> 330                 if (defValue != null && !defValue.equals(""))
> 
> I have a mental programming pattern which says
> 
> String xxx ; xxx != null and !xxx.equals("") -> StringUtils.isNotEmpty(xxx)

I too like using StringUtils isEmpty()/isNotEmpty().

The interpretation of null vs. empty string may have different meaning
for generation of Java depending upon the Java type of the column,
which is why I thought template handling (perhaps via creation of a
method for use by the template) would be more appropriate.
-- 

Daniel Rall

Mime
View raw message