[
https://issues.apache.org/jira/browse/WICKET-7151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17937177#comment-17937177
]
ASF subversion and git services commented on WICKET-7151:
---------------------------------------------------------
Commit cb06af2b8e20d50f3e3091b5bb7042d51ded2b5e in wicket's branch
refs/heads/master from Andrea Del Bene
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=cb06af2b8e ]
WICKET-7151 Misleading message when a Link component is added with wrong
id
> Misleading message when a Link component is added with wrong id
> ---------------------------------------------------------------
>
> Key: WICKET-7151
> URL: https://issues.apache.org/jira/browse/WICKET-7151
> Project: Wicket
> Issue Type: Improvement
> Affects Versions: 10.4.0, 9.20.0
> Reporter: Andrea Del Bene
> Priority: Minor
>
> When a Link component is added with wrong id we get a generic and misleading
> message about HtmlHeaderContainer and ComponentTag which is null:
>
> {quote}org.apache.wicket.WicketRuntimeException: Exception in rendering
> component: [HtmlHeaderContainer [Component id = _header_]]
> ...
> Caused by: java.lang.NullPointerException: Cannot invoke
> "org.apache.wicket.markup.ComponentTag.getName()" because "tag" is null
> at org.apache.wicket.markup.html.link.Link.appendAnchor(Link.java:295)
> at org.apache.wicket.markup.html.link.Link.renderHead(Link.java:403)
> at org.apache.wicket.Component.internalRenderHead(Component.java:2663)
> at
> org.apache.wicket.markup.renderStrategy.ChildFirstHeaderRenderStrategy$1.component(ChildFirstHeaderRenderStrategy.java:85)
> at
> org.apache.wicket.markup.renderStrategy.DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:96)
> at
> org.apache.wicket.markup.renderStrategy.DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:87)
> at
> org.apache.wicket.markup.renderStrategy.DeepChildFirstVisitor.visit(DeepChildFirstVisitor.java:51
> {quote}
>
> We should catch the original exception and provide a clearer message to the
> user
--
This message was sent by Atlassian Jira
(v8.20.10#820010)