Torsten Krah created WICKET-6271:
------------------------------------
Summary: 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)