[
https://issues.apache.org/jira/browse/WICKET-6271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15647355#comment-15647355
]
ASF subversion and git services commented on WICKET-6271:
---------------------------------------------------------
Commit 9d31cca77db21d3d25f53774353df91114f4b64e in wicket's branch
refs/heads/master from [~mgrigorov]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=9d31cca ]
WICKET-6271 IRequestableComponent getPage() javaDoc and Component
implementation mismatch
> IRequestableComponent getPage() javaDoc and Component implementation mismatch
> -----------------------------------------------------------------------------
>
> Key: WICKET-6271
> URL: https://issues.apache.org/jira/browse/WICKET-6271
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 6.25.0, 8.0.0
> Reporter: Torsten Krah
> Priority: Minor
>
> The
> https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/request/component/IRequestableComponent.java
> does tell in its javaDoc that *getPage()* may return null.
> {code}
> /**
> * Returns page this component belongs to.
> *
> * @return page instance or <code>null</code>
> */
> IRequestablePage getPage();
> {code}
> Looking at the implementor
> https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/Component.java
> it does throw a WicketRuntimeException if it is null.
> Looking at e.g. createRequestHandler(...) it does not check if its null
> either.
> So are implementors allowed to return null here or is the javaDoc on the
> interface obsolete?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)