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:49:56 UTC

git commit: Allow .jpeg resources.

Updated Branches:
  refs/heads/master 8b63cc687 -> e56b4ec4f


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/e56b4ec4
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/e56b4ec4
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/e56b4ec4

Branch: refs/heads/master
Commit: e56b4ec4f33c3890de6428b561e2fdc64b69c805
Parents: 8b63cc6
Author: martin-g <mg...@apache.org>
Authored: Wed Mar 7 10:27:29 2012 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Wed Mar 7 10:49:41 2012 +0200

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


http://git-wip-us.apache.org/repos/asf/wicket/blob/e56b4ec4/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");