NPE when trying to report an exception involving an instance that returns null
for toString()
---------------------------------------------------------------------------------------------
Key: TAPESTRY-2570
URL: https://issues.apache.org/jira/browse/TAPESTRY-2570
Project: Tapestry
Issue Type: Bug
Components: Framework
Affects Versions: 4.1.5
Reporter: Patrick Moore
Priority: Minor
Fix For: 4.1.6
Code from ExceptionAnaylzer:
(line 178) stringValue = value.toString().trim();
if (stringValue.length() == 0)
continue;
------------------------
value.toString() returns null. Seems somewhat useless code.....
I don't understand why the stringValue.length is being checked for it being an
empty string because then stringValue is not used. And no comments to help :-(
----------------------
Thread trace:
Thread [main] (Suspended (exception NullPointerException))
ExceptionAnalyzer.buildDescription(Throwable) line: 178
ExceptionAnalyzer.analyze(Throwable) line: 87
ExceptionAnalyzer.reportException(Throwable, PrintStream) line: 371
ApplicationServlet.show(Exception) line: 158
ApplicationServlet.init(ServletConfig) line: 207
StandardWrapper.loadServlet() line: 1139
StandardWrapper.load() line: 966
StandardContext.loadOnStartup(Container[]) line: 3956
StandardContext.start() line: 4230
StandardHost(ContainerBase).addChildInternal(Container) line: 760
StandardHost(ContainerBase).addChild(Container) line: 740
StandardHost.addChild(Container) line: 544
HostConfig.deployDescriptor(String, File, String) line: 626
HostConfig.deployDescriptors(File, String[]) line: 553
HostConfig.deployApps() line: 488
HostConfig.start() line: 1149
HostConfig.lifecycleEvent(LifecycleEvent) line: 311
LifecycleSupport.fireLifecycleEvent(String, Object) line: 120
StandardHost(ContainerBase).start() line: 1022
StandardHost.start() line: 736
StandardEngine(ContainerBase).start() line: 1014
StandardEngine.start() line: 443
StandardService.start() line: 448
StandardServer.start() line: 700
Catalina.start() line: 552
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
Bootstrap.start() line: 295
Bootstrap.main(String[]) line: 433
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]