Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0
-
None
-
None
-
Operating System: All
Platform: All
-
27876
Description
Calling ReflectionToStringBuilder.toString(null) throws an exception by design.
I think it should just return null. Right now I need to do nasty things like:
public String toString()
{ // dive into commons http client object as they do not implement toString(). return new ToStringBuilder(this).append("url", this.url).append("retryCount", this.retryCount).append( "multiThreadedHttpConnectionManager", this.multiThreadedHttpConnectionManager == null ? null : ReflectionToStringBuilder .toString(this.multiThreadedHttpConnectionManager)).append( "secureProtocolSocketFactory", this.secureProtocolSocketFactory == null ? null : ReflectionToStringBuilder .toString(this.secureProtocolSocketFactory)).toString(); }Will attach patch proposal.
Attachments
Issue Links
- is depended upon by
-
LANG-126 [lang][patch] Make ClassUtils methods null-safe and not throw an IAE.
- Closed