You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2017/02/27 08:13:09 UTC
[1/6] wicket git commit: Fix a typo in javadoc
Repository: wicket
Updated Branches:
refs/heads/master 3bb858f96 -> de0eaf531
Fix a typo in javadoc
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/ce0d2a95
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/ce0d2a95
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/ce0d2a95
Branch: refs/heads/master
Commit: ce0d2a95beb109ac8083be5022c436ed7f7db59e
Parents: abc080e
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Fri Feb 24 12:06:12 2017 +0100
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Fri Feb 24 12:06:26 2017 +0100
----------------------------------------------------------------------
.../src/main/java/org/apache/wicket/DefaultMapperContext.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/ce0d2a95/wicket-core/src/main/java/org/apache/wicket/DefaultMapperContext.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/DefaultMapperContext.java b/wicket-core/src/main/java/org/apache/wicket/DefaultMapperContext.java
index 6527f96..5f5f1f3 100644
--- a/wicket-core/src/main/java/org/apache/wicket/DefaultMapperContext.java
+++ b/wicket-core/src/main/java/org/apache/wicket/DefaultMapperContext.java
@@ -33,7 +33,7 @@ public class DefaultMapperContext implements IMapperContext
/**
* Constructor.
*
- * Uses the threal local Application
+ * Uses the thread local Application
*/
public DefaultMapperContext()
{
[2/6] wicket git commit: Update Jacoco to 0.7.9
Posted by mg...@apache.org.
Update Jacoco to 0.7.9
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/abc080e2
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/abc080e2
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/abc080e2
Branch: refs/heads/master
Commit: abc080e2680dbd76a39918ca59eebcd1a9e90361
Parents: 3bb858f
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Tue Feb 7 09:09:55 2017 +0100
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Fri Feb 24 12:06:26 2017 +0100
----------------------------------------------------------------------
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/abc080e2/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index d5beb05..4a3d2cf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -127,7 +127,7 @@
<maven.compiler.target>1.8</maven.compiler.target>
<!-- Project Versions -->
- <jacoco.version>0.7.8</jacoco.version>
+ <jacoco.version>0.7.9</jacoco.version>
<jetty.version>9.4.0.v20161208</jetty.version>
<joda-time.version>2.9.7</joda-time.version>
<junit.version>4.12</junit.version>
[5/6] wicket git commit: Fix error message to mention the proper
method to override
Posted by mg...@apache.org.
Fix error message to mention the proper method to override
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/c6246391
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/c6246391
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/c6246391
Branch: refs/heads/master
Commit: c6246391b307398606f7e07bffbe32ec2e7ef21e
Parents: ca22211
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Mon Feb 27 09:02:30 2017 +0100
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Mon Feb 27 09:03:07 2017 +0100
----------------------------------------------------------------------
.../main/java/org/apache/wicket/util/crypt/ClassCryptFactory.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/c6246391/wicket-util/src/main/java/org/apache/wicket/util/crypt/ClassCryptFactory.java
----------------------------------------------------------------------
diff --git a/wicket-util/src/main/java/org/apache/wicket/util/crypt/ClassCryptFactory.java b/wicket-util/src/main/java/org/apache/wicket/util/crypt/ClassCryptFactory.java
index b2e260c..d57d84a 100644
--- a/wicket-util/src/main/java/org/apache/wicket/util/crypt/ClassCryptFactory.java
+++ b/wicket-util/src/main/java/org/apache/wicket/util/crypt/ClassCryptFactory.java
@@ -75,7 +75,7 @@ public class ClassCryptFactory implements ICryptFactory
log.warn("failed, Wicket will fallback on a dummy implementation");
log.warn("\t(" + NoCrypt.class.getName() + ")");
log.warn("This is NOT recommended for production systems.");
- log.warn("Please override method org.apache.wicket.Application.newCrypt()");
+ log.warn("Please override method org.apache.wicket.util.crypt.ICryptFactory.newCrypt()");
log.warn("to provide a custom encryption/decryption implementation.");
log.warn("The cause of the instantiation failure: ");
log.warn("\t" + e.getMessage());
[6/6] wicket git commit: WicketWICKET-6328 Add 'pathInfo' to
ForwardAttributes
Posted by mg...@apache.org.
WicketWICKET-6328 Add 'pathInfo' to ForwardAttributes
Use RequestDispatcher constants to refer to the attributes
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/de0eaf53
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/de0eaf53
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/de0eaf53
Branch: refs/heads/master
Commit: de0eaf5315e5592c26b0acc83417feaf79bc140b
Parents: c624639
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Mon Feb 27 09:06:12 2017 +0100
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Mon Feb 27 09:07:00 2017 +0100
----------------------------------------------------------------------
.../protocol/http/servlet/ErrorAttributes.java | 27 +++++------
.../http/servlet/ForwardAttributes.java | 48 +++++++++++++-------
2 files changed, 45 insertions(+), 30 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/de0eaf53/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ErrorAttributes.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ErrorAttributes.java b/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ErrorAttributes.java
index 874af09..390fa56 100644
--- a/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ErrorAttributes.java
+++ b/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ErrorAttributes.java
@@ -16,6 +16,7 @@
*/
package org.apache.wicket.protocol.http.servlet;
+import javax.servlet.RequestDispatcher;
import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest;
@@ -23,18 +24,18 @@ import org.apache.wicket.util.lang.Args;
import org.apache.wicket.util.string.Strings;
/**
- * Represents additional error parameters present in a {@link ServletRequest} when the servlet
+ * Represents additional error attributes present in a {@link ServletRequest} when the servlet
* container is handling an error or a forward to an error page mapped by {@code error-page} element
* in {@code web.xml}.
*
* See documentation for the following request attributes for the values stored in this object:
* <ul>
- * <li>javax.servlet.error.status_code</li>
- * <li>javax.servlet.error.message</li>
- * <li>javax.servlet.error.request_uri</li>
- * <li>javax.servlet.error.servlet_name</li>
- * <li>javax.servlet.error.exception_type</li>
- * <li>javax.servlet.error.exception</li>
+ * <li>{@link RequestDispatcher#ERROR_STATUS_CODE}</li>
+ * <li>{@link RequestDispatcher#ERROR_MESSAGE}</li>
+ * <li>{@link RequestDispatcher#ERROR_REQUEST_URI}</li>
+ * <li>{@link RequestDispatcher#ERROR_SERVLET_NAME}</li>
+ * <li>{@link RequestDispatcher#ERROR_EXCEPTION_TYPE}</li>
+ * <li>{@link RequestDispatcher#ERROR_EXCEPTION}</li>
* </ul>
*
* @author igor
@@ -144,13 +145,13 @@ public class ErrorAttributes
public static ErrorAttributes of(HttpServletRequest request, String filterPrefix)
{
Args.notNull(request, "request");
- Integer code = (Integer)request.getAttribute("javax.servlet.error.status_code");
- String message = (String)request.getAttribute("javax.servlet.error.message");
- String uri = DispatchedRequestUtils.getRequestUri(request, "javax.servlet.error.request_uri", filterPrefix);
- String servlet = (String)request.getAttribute("javax.servlet.error.servlet_name");
+ Integer code = (Integer)request.getAttribute(RequestDispatcher.ERROR_STATUS_CODE);
+ String message = (String)request.getAttribute(RequestDispatcher.ERROR_MESSAGE);
+ String uri = DispatchedRequestUtils.getRequestUri(request, RequestDispatcher.ERROR_REQUEST_URI, filterPrefix);
+ String servlet = (String)request.getAttribute(RequestDispatcher.ERROR_SERVLET_NAME);
@SuppressWarnings("unchecked")
- Class<? extends Throwable> type = (Class<? extends Throwable>)request.getAttribute("javax.servlet.error.exception_type");
- Throwable ex = (Throwable)request.getAttribute("javax.servlet.error.exception");
+ Class<? extends Throwable> type = (Class<? extends Throwable>)request.getAttribute(RequestDispatcher.ERROR_EXCEPTION_TYPE);
+ Throwable ex = (Throwable)request.getAttribute(RequestDispatcher.ERROR_EXCEPTION);
if (!Strings.isEmpty(uri) || code != null || ex != null)
{
http://git-wip-us.apache.org/repos/asf/wicket/blob/de0eaf53/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ForwardAttributes.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ForwardAttributes.java b/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ForwardAttributes.java
index 9741b32..5950468 100644
--- a/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ForwardAttributes.java
+++ b/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ForwardAttributes.java
@@ -16,6 +16,7 @@
*/
package org.apache.wicket.protocol.http.servlet;
+import javax.servlet.RequestDispatcher;
import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest;
@@ -23,18 +24,16 @@ import org.apache.wicket.util.lang.Args;
import org.apache.wicket.util.string.Strings;
/**
- * Represents additional error parameters present in a {@link ServletRequest} when the servlet
- * container is handling an error or a forward to an error page mapped by {@code error-page} element
- * in {@code web.xml}.
+ * Represents additional attributes present in a {@link ServletRequest} when the servlet
+ * container is handling a forward to another path than the initially requested one.
*
* See documentation for the following request attributes for the values stored in this object:
* <ul>
- * <li>javax.servlet.error.status_code</li>
- * <li>javax.servlet.error.message</li>
- * <li>javax.servlet.error.request_uri</li>
- * <li>javax.servlet.error.servlet_name</li>
- * <li>javax.servlet.error.exception_type</li>
- * <li>javax.servlet.error.exception</li>
+ * <li>{@link javax.servlet.RequestDispatcher#FORWARD_CONTEXT_PATH}</li>
+ * <li>{@link javax.servlet.RequestDispatcher#FORWARD_PATH_INFO}</li>
+ * <li>{@link javax.servlet.RequestDispatcher#FORWARD_QUERY_STRING}</li>
+ * <li>{@link javax.servlet.RequestDispatcher#FORWARD_REQUEST_URI}</li>
+ * <li>{@link javax.servlet.RequestDispatcher#FORWARD_SERVLET_PATH}</li>
* </ul>
*
*/
@@ -52,6 +51,9 @@ public class ForwardAttributes
// javax.servlet.forward.query_string
private final String queryString;
+ // javax.servlet.forward.path_info
+ private final String pathInfo;
+
/**
* Constructor.
*
@@ -59,14 +61,16 @@ public class ForwardAttributes
* @param servletPath
* @param contextPath
* @param queryString
+ * @param pathInfo
*/
private ForwardAttributes(String requestUri, String servletPath, String contextPath,
- String queryString)
+ String queryString, String pathInfo)
{
this.requestUri = requestUri;
this.servletPath = servletPath;
this.contextPath = contextPath;
this.queryString = queryString;
+ this.pathInfo = pathInfo;
}
/**
@@ -110,6 +114,13 @@ public class ForwardAttributes
}
/**
+ * @return the path info of the request before the forward dispatch
+ */
+ public String getPathInfo() {
+ return pathInfo;
+ }
+
+ /**
* Factory for creating instances of this class.
*
* @param request
@@ -119,15 +130,17 @@ public class ForwardAttributes
{
Args.notNull(request, "request");
- final String requestUri = DispatchedRequestUtils.getRequestUri(request, "javax.servlet.forward.request_uri", filterPrefix);
- final String servletPath = (String)request.getAttribute("javax.servlet.forward.servlet_path");
- final String contextPath = (String)request.getAttribute("javax.servlet.forward.context_path");
- final String queryString = (String)request.getAttribute("javax.servlet.forward.query_string");
+ final String requestUri = DispatchedRequestUtils.getRequestUri(request, RequestDispatcher.FORWARD_REQUEST_URI, filterPrefix);
+ final String servletPath = (String)request.getAttribute(RequestDispatcher.FORWARD_SERVLET_PATH);
+ final String contextPath = (String)request.getAttribute(RequestDispatcher.FORWARD_CONTEXT_PATH);
+ final String queryString = (String)request.getAttribute(RequestDispatcher.FORWARD_QUERY_STRING);
+ final String pathInfo = (String)request.getAttribute(RequestDispatcher.FORWARD_PATH_INFO);
if (!Strings.isEmpty(requestUri) || !Strings.isEmpty(servletPath) ||
- !Strings.isEmpty(contextPath) || !Strings.isEmpty(queryString))
+ !Strings.isEmpty(contextPath) || !Strings.isEmpty(queryString) ||
+ !Strings.isEmpty(pathInfo))
{
- return new ForwardAttributes(requestUri, servletPath, contextPath, queryString);
+ return new ForwardAttributes(requestUri, servletPath, contextPath, queryString, pathInfo);
}
return null;
}
@@ -136,6 +149,7 @@ public class ForwardAttributes
public String toString()
{
return "ForwardAttributes [requestUri=" + requestUri + ", servletPath=" + servletPath +
- ", contextPath=" + contextPath + ", queryString=" + queryString + "]";
+ ", contextPath=" + contextPath + ", queryString=" + queryString +
+ ", pathInfo=" + pathInfo + "]";
}
}
[3/6] wicket git commit: Make Lambdas a final class with private
constructor so that it is used as a static utility
Posted by mg...@apache.org.
Make Lambdas a final class with private constructor so that it is used as a static utility
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/a59dd223
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/a59dd223
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/a59dd223
Branch: refs/heads/master
Commit: a59dd223c14799a2eeb278c372d1bbd5d6a1a751
Parents: ce0d2a9
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Mon Feb 27 09:01:18 2017 +0100
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Mon Feb 27 09:01:18 2017 +0100
----------------------------------------------------------------------
wicket-core/src/main/java/org/apache/wicket/lambda/Lambdas.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/a59dd223/wicket-core/src/main/java/org/apache/wicket/lambda/Lambdas.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/lambda/Lambdas.java b/wicket-core/src/main/java/org/apache/wicket/lambda/Lambdas.java
index 85b0bb4..185597c 100644
--- a/wicket-core/src/main/java/org/apache/wicket/lambda/Lambdas.java
+++ b/wicket-core/src/main/java/org/apache/wicket/lambda/Lambdas.java
@@ -39,7 +39,7 @@ import org.danekja.java.util.function.serializable.SerializableFunction;
* Convenience class for easy static importing of lambda factory methods in several components and
* behaviors.
*/
-public class Lambdas
+public final class Lambdas
{
/**
* Creates an {@link AbstractAjaxTimerBehavior} based on lambda expressions
@@ -310,4 +310,7 @@ public class Lambdas
{
return Behavior.onAttribute(attributeName, onAttribute);
}
+
+ private Lambdas()
+ {}
}
[4/6] wicket git commit: Fix a typo in javadoc
Posted by mg...@apache.org.
Fix a typo in javadoc
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/ca222112
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/ca222112
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/ca222112
Branch: refs/heads/master
Commit: ca22211202fa0c6fe0d23751ddbe90b440ae65fd
Parents: a59dd22
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Mon Feb 27 09:02:01 2017 +0100
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Mon Feb 27 09:02:20 2017 +0100
----------------------------------------------------------------------
.../wicket/protocol/http/servlet/DispatchedRequestUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/ca222112/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/DispatchedRequestUtils.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/DispatchedRequestUtils.java b/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/DispatchedRequestUtils.java
index 83d9ae7..36a0e57 100644
--- a/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/DispatchedRequestUtils.java
+++ b/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/DispatchedRequestUtils.java
@@ -34,7 +34,7 @@ class DispatchedRequestUtils
* @param request
* the dispatched request
* @param attributeName
- * the name of the requets attribute in which the original request uri is stored
+ * the name of the request attribute in which the original request uri is stored
* @param filterPrefix
* the configured filter prefix for WicketFilter
* @return the uri of the dispatched request without the leading filterPrefix