"Henning P. Schmiedehausen" <[EMAIL PROTECTED]> 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

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to