You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Hudson (JIRA)" <de...@tapestry.apache.org> on 2009/11/19 05:42:40 UTC

[jira] Commented: (TAPESTRY-2570) NPE when trying to report an exception involving an instance that returns null for toString()

    [ https://issues.apache.org/jira/browse/TAPESTRY-2570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779826#action_12779826 ] 

Hudson commented on TAPESTRY-2570:
----------------------------------

Integrated in tapestry-4.1-trunk #11 (See [http://hudson.zones.apache.org/hudson/job/tapestry-4.1-trunk/11/])
    

> 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
>            Assignee: Andreas Andreou
>            Priority: Minor
>             Fix For: 4.1.7
>
>
> Problem occured when I had a custom hivemind schema. The custom hivemind schema was trying to set a non-existent property on an object that was being created. Because the 'value's  toString() method just returns one of its properties as its string value, value.toString() returns null.
> 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.