posted 20 years ago
By taking about the handling of NullPointerException for null strings, currently, we try to use an alternative approach.
We used the APIs provided by Jakarta Common, the StringUtils. This package provides lots of functions for string manipulations, like isEmpty(), isBlank(), equals(), etc. And the APIs have been internally handled the null cases, i.e., if x is null, StringUtils.isEmpty(x) returns true instead of throwing the NullPointerException.
Nick
SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)