click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r958487 - in /click/trunk/click: documentation/docs/roadmap-changes.html framework/src/org/apache/click/Context.java
Date Mon, 28 Jun 2010 07:28:05 GMT
Author: sabob
Date: Mon Jun 28 07:28:04 2010
New Revision: 958487

URL: http://svn.apache.org/viewvc?rev=958487&view=rev
Log:
fixed Context.createPage that could lead to duplicate page-to-path mappings. CLK-625

Modified:
    click/trunk/click/documentation/docs/roadmap-changes.html
    click/trunk/click/framework/src/org/apache/click/Context.java

Modified: click/trunk/click/documentation/docs/roadmap-changes.html
URL: http://svn.apache.org/viewvc/click/trunk/click/documentation/docs/roadmap-changes.html?rev=958487&r1=958486&r2=958487&view=diff
==============================================================================
--- click/trunk/click/documentation/docs/roadmap-changes.html (original)
+++ click/trunk/click/documentation/docs/roadmap-changes.html Mon Jun 28 07:28:04 2010
@@ -76,7 +76,7 @@ includes improved Ajax support and @Bind
 
 <dl>
   <dt><a name="2.3.0"></a>
-      <div class="release-header">Latest Release - Version 2.3.0 Milestone 1 - ?? June
2010</div>
+      <div class="release-header">Latest Release - Version 2.3.0 Milestone 1 - ?? July
2010</div>
   </dt>
   <dd>
       <div style="margin-left: -2em; margin-top: 1.5em; margin-bottom: 1em;">
@@ -152,6 +152,11 @@ Select.setAttribute("onchange", "Click.s
               Fixed Form validation to add and remove an <tt>error</tt> class
               [<a target="_blank" href="https://issues.apache.org/jira/browse/CLK-700">CLK-700</a>].
           </li>
+           <li class="change">
+              Fixed issue where Context.createPage could lead to duplicate page-to-class
+              mappings. This issue was raised by Andrey Rybin and fixed by Md. Jahid Shohel
+              [<a target="_blank" href="https://issues.apache.org/jira/browse/CLK-625">CLK-625</a>].
+          </li>
           <li class="change">
               Update to the latest version for some of the JARs dependencies: log4j-1.2.16,
freemarker-2.3.16,
               commons-codec-1.4, and commons-lang-2.5.

Modified: click/trunk/click/framework/src/org/apache/click/Context.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/Context.java?rev=958487&r1=958486&r2=958487&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/Context.java (original)
+++ click/trunk/click/framework/src/org/apache/click/Context.java Mon Jun 28 07:28:04 2010
@@ -539,12 +539,21 @@ public class Context {
      *
      * setForward(userEdit); </pre>
      *
+     * The given page path must start with a <tt>'/'</tt>.
+     *
      * @param path the Page path as configured in the click.xml file
      * @return a new Page object
      * @throws IllegalArgumentException if the Page is not found
      */
     @SuppressWarnings("unchecked")
     public <T extends Page> T createPage(String path) {
+        if (path == null || path.length() == 0) {
+            throw new IllegalArgumentException("page path cannot be null or empty");
+        }
+
+        if (path.charAt(0) != '/') {
+            throw new IllegalArgumentException("page path must start with a '/'");
+        }
         return (T) clickServlet.createPage(path, request);
     }
 



Mime
View raw message