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/03/07 09:29:55 UTC

[2/2] git commit: Allow .jpeg resources.

Allow .jpeg resources.

Allow no caching at all (supported by the previous version of SPRG).


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

Branch: refs/heads/wicket-1.5.x
Commit: f86fe6ef41c284fb871e5cd37f1aa21bafbc4602
Parents: 19ad12e
Author: martin-g <mg...@apache.org>
Authored: Wed Mar 7 10:27:29 2012 +0200
Committer: martin-g <mg...@apache.org>
Committed: Wed Mar 7 10:29:12 2012 +0200

----------------------------------------------------------------------
 .../markup/html/SecurePackageResourceGuard.java    |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/f86fe6ef/wicket-core/src/main/java/org/apache/wicket/markup/html/SecurePackageResourceGuard.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/SecurePackageResourceGuard.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/SecurePackageResourceGuard.java
index c5773da..e5f0db3 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/SecurePackageResourceGuard.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/SecurePackageResourceGuard.java
@@ -97,11 +97,12 @@ public class SecurePackageResourceGuard extends PackageResourceGuard
 	 * Constructor.
 	 *
 	 * @param cache
-	 *      the internal cache that will hold the results for all already checked resources
+	 *      the internal cache that will hold the results for all already checked resources.
+	 *      Use {@code null} to disable caching.
 	 */
 	public SecurePackageResourceGuard(final ConcurrentMap<String, Boolean> cache)
 	{
-		this.cache = Args.notNull(cache, "cache");
+		this.cache = cache;
 
 		// the order is important for better performance
 		// first add the most commonly used
@@ -109,6 +110,7 @@ public class SecurePackageResourceGuard extends PackageResourceGuard
 		addPattern("+*.css");
 		addPattern("+*.png");
 		addPattern("+*.jpg");
+		addPattern("+*.jpeg");
 		addPattern("+*.gif");
 		addPattern("+*.ico");