Repository: wicket
Updated Branches:
  refs/heads/master 2135f7b7d -> 9d31cca77


WICKET-6271 IRequestableComponent getPage() javaDoc and Component 
implementation mismatch


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/9d31cca7
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/9d31cca7
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/9d31cca7

Branch: refs/heads/master
Commit: 9d31cca77db21d3d25f53774353df91114f4b64e
Parents: 2135f7b
Author: Martin Tzvetanov Grigorov <[email protected]>
Authored: Tue Nov 8 12:57:30 2016 +0100
Committer: Martin Tzvetanov Grigorov <[email protected]>
Committed: Tue Nov 8 13:00:09 2016 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/wicket/Component.java        |  7 ++++---
 .../wicket/request/component/IRequestableComponent.java   | 10 ++++++----
 2 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/9d31cca7/wicket-core/src/main/java/org/apache/wicket/Component.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/Component.java 
b/wicket-core/src/main/java/org/apache/wicket/Component.java
index 8f140b6..ed2c22f 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Component.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Component.java
@@ -1751,8 +1751,9 @@ public abstract class Component
         * Gets the page holding this component.
         * 
         * @return The page holding this component
-        * @throws IllegalStateException
+        * @throws WicketRuntimeException
         *             Thrown if component is not yet attached to a Page.
+        * @see #findPage()
         */
        @Override
        public final Page getPage()
@@ -3706,9 +3707,9 @@ public abstract class Component
 
        /**
         * If this Component is a Page, returns self. Otherwise, searches for 
the nearest Page parent in
-        * the component hierarchy. If no Page parent can be found, null is 
returned.
+        * the component hierarchy. If no Page parent can be found, {@code 
null} is returned.
         * 
-        * @return The Page or null if none can be found
+        * @return The Page or {@code null} if none can be found
         */
        protected final Page findPage()
        {

http://git-wip-us.apache.org/repos/asf/wicket/blob/9d31cca7/wicket-core/src/main/java/org/apache/wicket/request/component/IRequestableComponent.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/request/component/IRequestableComponent.java
 
b/wicket-core/src/main/java/org/apache/wicket/request/component/IRequestableComponent.java
index 33fdbad..d241874 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/request/component/IRequestableComponent.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/request/component/IRequestableComponent.java
@@ -17,7 +17,7 @@
 package org.apache.wicket.request.component;
 
 import org.apache.wicket.Component;
-import org.apache.wicket.IRequestListener;
+import org.apache.wicket.WicketRuntimeException;
 import org.apache.wicket.behavior.Behavior;
 import org.apache.wicket.behavior.InvalidBehaviorIdException;
 import org.apache.wicket.model.IDetachable;
@@ -47,9 +47,11 @@ public interface IRequestableComponent
        /**
         * Returns page this component belongs to.
         * 
-        * @return page instance or <code>null</code>
+        * @return The page holding this component
+        * @throws WicketRuntimeException
+        *             Thrown if component is not yet attached to a Page.
         */
-       IRequestablePage getPage();
+       IRequestablePage getPage() throws WicketRuntimeException;
 
        /**
         * Gets the component at the given path.
@@ -108,7 +110,7 @@ public interface IRequestableComponent
        void detach();
 
        /**
-        * @return {@code true} if it is save to call an {@link 
IRequestListener} on this component
+        * @return {@code true} if it is save to call an {@link 
org.apache.wicket.IRequestListener} on this component
         *      when the owner page is freshly created after expiration
         */
        boolean canCallListenerInterfaceAfterExpiry();

Reply via email to