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 2012/01/30 12:59:06 UTC
[2/2] git commit: Use Args
Use Args
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/60219709
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/60219709
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/60219709
Branch: refs/heads/master
Commit: 60219709626d87a8040c38c062fd9412f0fb0566
Parents: dd243ea
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Mon Jan 30 13:57:48 2012 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Mon Jan 30 13:57:48 2012 +0200
----------------------------------------------------------------------
.../strategy/DefaultAuthenticationStrategy.java | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/60219709/wicket-core/src/main/java/org/apache/wicket/authentication/strategy/DefaultAuthenticationStrategy.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/authentication/strategy/DefaultAuthenticationStrategy.java b/wicket-core/src/main/java/org/apache/wicket/authentication/strategy/DefaultAuthenticationStrategy.java
index 864794f..953a908 100644
--- a/wicket-core/src/main/java/org/apache/wicket/authentication/strategy/DefaultAuthenticationStrategy.java
+++ b/wicket-core/src/main/java/org/apache/wicket/authentication/strategy/DefaultAuthenticationStrategy.java
@@ -20,6 +20,7 @@ import org.apache.wicket.Application;
import org.apache.wicket.authentication.IAuthenticationStrategy;
import org.apache.wicket.util.cookies.CookieUtils;
import org.apache.wicket.util.crypt.ICrypt;
+import org.apache.wicket.util.lang.Args;
import org.apache.wicket.util.string.Strings;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -55,11 +56,7 @@ public class DefaultAuthenticationStrategy implements IAuthenticationStrategy
*/
public DefaultAuthenticationStrategy(final String cookieKey)
{
- if (Strings.isEmpty(cookieKey))
- {
- throw new IllegalArgumentException("Parameter 'cookieKey' must not be null or empty.");
- }
- this.cookieKey = cookieKey;
+ this.cookieKey = Args.notEmpty(cookieKey, "cookieKey");
}
/**