Repository: wicket
Updated Branches:
  refs/heads/master 34177bf8d -> 49d398333


WICKET-6481 Added JavaDoc to avoid mount paths starting with
reserved URL segments

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

Branch: refs/heads/master
Commit: 49d398333a1a256078ceecac5a58d768674e77de
Parents: 34177bf
Author: Andrea Del Bene <adelb...@apache.org>
Authored: Wed Oct 18 17:08:19 2017 +0200
Committer: Andrea Del Bene <adelb...@apache.org>
Committed: Wed Oct 18 17:08:19 2017 +0200

----------------------------------------------------------------------
 .../wicket/core/request/mapper/IMapperContext.java |  4 +++-
 .../wicket/protocol/http/WebApplication.java       | 17 ++++++++++++++---
 2 files changed, 17 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/49d39833/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/IMapperContext.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/IMapperContext.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/IMapperContext.java
index 792904f..d446b7a 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/IMapperContext.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/IMapperContext.java
@@ -20,7 +20,9 @@ import org.apache.wicket.request.component.IRequestablePage;
 import org.apache.wicket.request.resource.ResourceReferenceRegistry;
 
 /**
- * Utility interface for providing and creating new page instances.
+ * Utility interface for providing and creating new page instances. This 
interface is used also to 
+ * define which segments are reserved for internal use (see methods {@link 
#getNamespace()}, {@link #getPageIdentifier()},
+ * {@link #getBookmarkableIdentifier()} and {@link #getResourceIdentifier()}).
  *
  * @author Matej Knopp
  */

http://git-wip-us.apache.org/repos/asf/wicket/blob/49d39833/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebApplication.java 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
index bc41b12..59cb318 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
@@ -22,12 +22,10 @@ import java.util.Collection;
 import java.util.LinkedList;
 import java.util.Locale;
 import java.util.function.Function;
-
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
-
 import org.apache.wicket.Application;
 import org.apache.wicket.Page;
 import org.apache.wicket.RuntimeConfigurationType;
@@ -36,6 +34,7 @@ import org.apache.wicket.WicketRuntimeException;
 import org.apache.wicket.ajax.AjaxRequestHandler;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.AjaxRequestTargetListenerCollection;
+import org.apache.wicket.core.request.mapper.IMapperContext;
 import org.apache.wicket.core.request.mapper.MountedMapper;
 import org.apache.wicket.core.request.mapper.PackageMapper;
 import org.apache.wicket.core.request.mapper.ResourceMapper;
@@ -323,6 +322,10 @@ public abstract class WebApplication extends Application
        /**
         * Mounts a page class to the given path.
         * 
+        * <p>
+        * NOTE: mount path must not start with reserved URL segments! See 
{@link IMapperContext} to know
+        * which segments are reserved for internal use.
+        * </p>
         * @param <T>
         *            type of page
         * 
@@ -341,6 +344,10 @@ public abstract class WebApplication extends Application
        /**
         * Mounts a shared resource to the given path.
         * 
+        * <p>
+        * NOTE: mount path must not start with reserved URL segments! See 
{@link IMapperContext} to know
+        * which segments are reserved for internal use.
+        * </p>
         * @param path
         *            the path to mount the resource reference on
         * @param reference
@@ -359,7 +366,11 @@ public abstract class WebApplication extends Application
 
        /**
         * Mounts mounts all bookmarkable pages in a the pageClass's package to 
the given path.
-        * 
+        *
+        * <p>
+        * NOTE: mount path must not start with reserved URL segments! See 
{@link IMapperContext} to know
+        * which segments are reserved for internal use.
+        * </p>
         * @param <P>
         *            type of page
         * 

Reply via email to