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 2015/05/27 07:48:24 UTC

[1/5] wicket git commit: Added DebugBar improvements:

Repository: wicket
Updated Branches:
  refs/heads/master 9f08f5674 -> 549827f9f


Added DebugBar improvements:

- Add `positionBottom` method to position it at the bottom of the screen
- Remember expanded/collapsed state


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

Branch: refs/heads/master
Commit: 49714c0dee16447d083f5de2f795a34b8671e1a9
Parents: 3c17e8c
Author: Robert Gruendler <ro...@dubture.com>
Authored: Tue May 26 20:11:05 2015 +0200
Committer: Robert Gruendler <ro...@dubture.com>
Committed: Tue May 26 20:11:05 2015 +0200

----------------------------------------------------------------------
 .../wicket/devutils/debugbar/DebugBar.java      | 13 +++++++
 .../devutils/debugbar/wicket-debugbar.css       | 11 ++++++
 .../wicket/devutils/debugbar/wicket-debugbar.js | 40 ++++++++++++++++++++
 3 files changed, 64 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/49714c0d/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/DebugBar.java
----------------------------------------------------------------------
diff --git a/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/DebugBar.java b/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/DebugBar.java
index c839d64..46c4c87 100644
--- a/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/DebugBar.java
+++ b/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/DebugBar.java
@@ -27,6 +27,7 @@ import org.apache.wicket.devutils.DevUtilsPanel;
 import org.apache.wicket.markup.head.CssHeaderItem;
 import org.apache.wicket.markup.head.IHeaderResponse;
 import org.apache.wicket.markup.head.JavaScriptHeaderItem;
+import org.apache.wicket.markup.head.OnDomReadyHeaderItem;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.image.Image;
 import org.apache.wicket.markup.html.list.ListItem;
@@ -119,6 +120,17 @@ public class DebugBar extends DevUtilsPanel
 		add(contentSection("content", initiallyExpanded));
 	}
 
+
+	/**
+	 * Positions the DebugBar at the bottom of the page
+	 * @return
+	 */
+	public DebugBar positionBottom()
+	{
+		add(AttributeModifier.append("class", "bottom"));
+		return this;
+	}
+
 	private Component contentSection(final String id, boolean initiallyExpanded)
 	{
 		WebMarkupContainer section = new WebMarkupContainer(id);
@@ -169,6 +181,7 @@ public class DebugBar extends DevUtilsPanel
 			"wicket-debugbar.css")));
 		response.render(JavaScriptHeaderItem.forReference(new JavaScriptResourceReference(
 			DebugBar.class, "wicket-debugbar.js")));
+		response.render(OnDomReadyHeaderItem.forScript("wicketDebugBarCheckState()"));
 	}
 
 	/**

http://git-wip-us.apache.org/repos/asf/wicket/blob/49714c0d/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/wicket-debugbar.css
----------------------------------------------------------------------
diff --git a/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/wicket-debugbar.css b/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/wicket-debugbar.css
index 08c429a..b5cb09a 100644
--- a/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/wicket-debugbar.css
+++ b/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/wicket-debugbar.css
@@ -22,6 +22,12 @@
 	top: 0;
 	padding: 0px 10px 0px 5px;
 }
+
+#wicketDebugBar.bottom {
+    top: auto;
+    bottom: 0px;
+}
+
 #wicketDebugBar img {
 	margin: 4px 10px -3px 0px;
 	height: 16px;
@@ -31,6 +37,7 @@
 #wicketDebugBarRemove img {
 	margin-left: 10px;
 	margin-right: 0px;
+	cursor: pointer;
 }
 #wicketDebugBar .contributor a {
 	margin-right: 10px;
@@ -56,3 +63,7 @@
 	background-color: #DDDDDD;
 	opacity: 0.8;
 }
+
+#wicketDebugBarCollapse {
+	cursor: pointer;
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/49714c0d/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/wicket-debugbar.js
----------------------------------------------------------------------
diff --git a/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/wicket-debugbar.js b/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/wicket-debugbar.js
index 6f1b287..3a05021 100644
--- a/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/wicket-debugbar.js
+++ b/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/wicket-debugbar.js
@@ -26,5 +26,45 @@ function wicketDebugBarToggleVisibility(elemID) {
 	var elem = document.getElementById(elemID);
 	var vis  = elem.style.display != 'none';
 	elem.style.display = (vis ? 'none' : '');
+    // alter the state cookie so we can initialize it properly on domReady
+	wicketDebugBarSetExpandedCookie(vis ? 'collapsed' : 'expanded')
 }
 
+function wicketDebugBarSetExpandedCookie(value) {
+	document.cookie =  "wicketDebugBarState=" + window.escape(value);
+}
+
+function wicketDebugBarGetExpandedCookie() {
+	var name = 'wicketDebugBarState';
+	if (document.cookie.length > 0) {
+		var start = document.cookie.indexOf (name + "=");
+		if (start !== -1) {
+			start = start + name.length + 1;
+			var end = document.cookie.indexOf(";", start);
+			if (end === -1) {
+				end = document.cookie.length;
+			}
+			return window.unescape(document.cookie.substring(start,end));
+		} else {
+			return null;
+		}
+	} else {
+		return null;
+	}
+}
+
+function wicketDebugBarCheckState() {
+	var state = wicketDebugBarGetExpandedCookie();
+    // state cookie has not been set. determine state and set it
+	if (state === null) {
+		var isVisible = $('#wicketDebugBarContents').is(':visible');
+		wicketDebugBarSetExpandedCookie(isVisible ? 'expanded' : 'collapsed');
+    // set state of debug bar according to cookie
+	} else {
+		if (state === 'expanded') {
+			$('#wicketDebugBarContents').css('display', 'inherit');
+		} else {
+			$('#wicketDebugBarContents').css('display', 'none');
+		}
+	}
+}


[5/5] wicket git commit: Merge branch 'pr-120-feature/debugbar'

Posted by mg...@apache.org.
Merge branch 'pr-120-feature/debugbar'


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

Branch: refs/heads/master
Commit: 549827f9fe41be3611ba9ac84e0db507c7e1e149
Parents: a30f3ca 6087046
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Wed May 27 08:47:59 2015 +0300
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Wed May 27 08:47:59 2015 +0300

----------------------------------------------------------------------
 .../migrate/StringResourceModelMigration.java   |  5 +--
 .../wicket/devutils/debugbar/DebugBar.java      | 13 +++++++
 .../devutils/debugbar/wicket-debugbar.css       | 11 ++++++
 .../wicket/devutils/debugbar/wicket-debugbar.js | 40 ++++++++++++++++++++
 4 files changed, 65 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/549827f9/wicket-core/src/main/java/org/apache/wicket/migrate/StringResourceModelMigration.java
----------------------------------------------------------------------
diff --cc wicket-core/src/main/java/org/apache/wicket/migrate/StringResourceModelMigration.java
index 6e8a6a7,e8d1d57..7431254
--- a/wicket-core/src/main/java/org/apache/wicket/migrate/StringResourceModelMigration.java
+++ b/wicket-core/src/main/java/org/apache/wicket/migrate/StringResourceModelMigration.java
@@@ -37,7 -37,7 +37,6 @@@ import org.apache.wicket.model.StringRe
   * </pre>
   *
   * and then use your IDE's <i>Inline Method</i> refactoring support to use the new fluent API.
-  * 
 - *
   * @since 7.0.0
   */
  public class StringResourceModelMigration
@@@ -45,10 -45,10 +44,8 @@@
  	/**
  	 * @deprecated use 'inline method' to get rid of the deprecation warning and complete the
  	 *             migration to Wicket 7 API.
--	 */
--	/*
  	 * Original JavaDoc:
- 	 * 
+ 	 *
  	 * Creates a new string resource model using the supplied parameters. <p> The relative component
  	 * parameter should generally be supplied, as without it resources can not be obtained from
  	 * resource bundles that are held relative to a particular component or page. However, for


[3/5] wicket git commit: Added migration assistant for StringResourceModel

Posted by mg...@apache.org.
Added migration assistant for StringResourceModel

Using this class you can easily migrate your old Wicket 6.x uses
of StringResourceModel's cryptic constructors to the new fluent
API of Wicket 7. See the JavaDoc of StringResourceModelMigration
for more information.


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

Branch: refs/heads/master
Commit: cdf9a7345b2da3fb2250e9938ae688d33ec7ae78
Parents: 49714c0
Author: Martijn Dashorst <ma...@gmail.com>
Authored: Tue May 26 14:41:00 2015 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Wed May 27 08:41:37 2015 +0300

----------------------------------------------------------------------
 .../migrate/StringResourceModelMigration.java   | 178 +++++++++++++++++++
 1 file changed, 178 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/cdf9a734/wicket-core/src/main/java/org/apache/wicket/migrate/StringResourceModelMigration.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/migrate/StringResourceModelMigration.java b/wicket-core/src/main/java/org/apache/wicket/migrate/StringResourceModelMigration.java
new file mode 100644
index 0000000..e8d1d57
--- /dev/null
+++ b/wicket-core/src/main/java/org/apache/wicket/migrate/StringResourceModelMigration.java
@@ -0,0 +1,178 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.migrate;
+
+import org.apache.wicket.Component;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.StringResourceModel;
+
+/**
+ * Assistant class for migrating old Wicket 6.x style StringResourceModel instantiations to the
+ * Wicket 7.x fluent API.
+ *
+ * Replace your old invocation of {@code StringResourceModel}'s constructor:
+ *
+ * <pre>
+ * new StringResourceModel(...);
+ * </pre>
+ *
+ * with the following snippet:
+ *
+ * <pre>
+ * StringResourceModelMigration.of(...);
+ * </pre>
+ *
+ * and then use your IDE's <i>Inline Method</i> refactoring support to use the new fluent API.
+ *
+ * @since 7.0.0
+ */
+public class StringResourceModelMigration
+{
+	/**
+	 * @deprecated use 'inline method' to get rid of the deprecation warning and complete the
+	 *             migration to Wicket 7 API.
+	 */
+	/*
+	 * Original JavaDoc:
+	 *
+	 * Creates a new string resource model using the supplied parameters. <p> The relative component
+	 * parameter should generally be supplied, as without it resources can not be obtained from
+	 * resource bundles that are held relative to a particular component or page. However, for
+	 * application that use only global resources then this parameter may be null. <p> The model
+	 * parameter is also optional and only needs to be supplied if value substitutions are to take
+	 * place on either the resource key or the actual resource strings. <p> The parameters parameter
+	 * is also optional and is used for substitutions.
+	 *
+	 * @param resourceKey The resource key for this string resource
+	 *
+	 * @param component The component that the resource is relative to
+	 *
+	 * @param model The model to use for property substitutions
+	 *
+	 * @param parameters The parameters to substitute using a Java MessageFormat object
+	 */
+	@Deprecated
+	@SuppressWarnings(value = "javadoc")
+	public static StringResourceModel of(final String resourceKey, final Component component,
+		final IModel<?> model, final Object... parameters)
+	{
+		return new StringResourceModel(resourceKey, component).setModel(model).setParameters(
+			parameters);
+	}
+
+	/**
+	 * @deprecated use 'inline method' to get rid of the deprecation warning and complete the
+	 *             migration to Wicket 7 API.
+	 */
+	/*
+	 * Original JavaDoc:
+	 *
+	 * Creates a new string resource model using the supplied parameters.
+	 * <p>
+	 * The relative component parameter should generally be supplied, as without it resources can
+	 * not be obtained from resource bundles that are held relative to a particular component or
+	 * page. However, for application that use only global resources then this parameter may be
+	 * null.
+	 * <p>
+	 * The model parameter is also optional and only needs to be supplied if value substitutions are
+	 * to take place on either the resource key or the actual resource strings.
+	 * <p>
+	 * The parameters parameter is also optional and is used for substitutions.
+	 *
+	 * @param resourceKey
+	 *            The resource key for this string resource
+	 * @param component
+	 *            The component that the resource is relative to
+	 * @param model
+	 *            The model to use for property substitutions
+	 * @param defaultValue
+	 *            The default value if the resource key is not found.
+	 * @param parameters
+	 *            The parameters to substitute using a Java MessageFormat object
+	 */
+	@Deprecated
+	@SuppressWarnings(value = "javadoc")
+	public static StringResourceModel of(final String resourceKey, final Component component,
+		final IModel<?> model, final String defaultValue, final Object... parameters)
+	{
+		return new StringResourceModel(resourceKey, component).setModel(model)
+			.setDefaultValue(defaultValue)
+			.setParameters(parameters);
+	}
+
+	/**
+	 * @deprecated use 'inline method' to get rid of the deprecation warning and complete the
+	 *             migration to Wicket 7 API.
+	 */
+	/*
+	 * Original JavaDoc:
+	 *
+	 * Creates a new string resource model using the supplied parameters.
+	 * <p>
+	 * The model parameter is also optional and only needs to be supplied if value substitutions are
+	 * to take place on either the resource key or the actual resource strings.
+	 * <p>
+	 * The parameters parameter is also optional and is used for substitutions.
+	 *
+	 * @param resourceKey
+	 *            The resource key for this string resource
+	 * @param model
+	 *            The model to use for property substitutions
+	 * @param parameters
+	 *            The parameters to substitute using a Java MessageFormat object
+	 */
+	@Deprecated
+	@SuppressWarnings(value = "javadoc")
+	public static StringResourceModel of(final String resourceKey, final IModel<?> model,
+		final Object... parameters)
+	{
+		return new StringResourceModel(resourceKey).setModel(model).setParameters(parameters);
+	}
+
+	/**
+	 * @deprecated use 'inline method' to get rid of the deprecation warning and complete the
+	 *             migration to Wicket 7 API.
+	 */
+	/*
+	 * Original JavaDoc:
+	 *
+	 * Creates a new string resource model using the supplied parameters.
+	 * <p>
+	 * The model parameter is also optional and only needs to be supplied if value substitutions are
+	 * to take place on either the resource key or the actual resource strings.
+	 * <p>
+	 * The parameters parameter is also optional and is used for substitutions.
+	 *
+	 * @param resourceKey
+	 *            The resource key for this string resource
+	 * @param model
+	 *            The model to use for property substitutions
+	 * @param parameters
+	 *            The parameters to substitute using a Java MessageFormat object
+	 * @param defaultValue
+	 *            The default value if the resource key is not found.
+	 */
+	@Deprecated
+	@SuppressWarnings(value = "javadoc")
+	public static StringResourceModel of(final String resourceKey, final IModel<?> model,
+		final String defaultValue, final Object... parameters)
+	{
+		return new StringResourceModel(resourceKey).setModel(model)
+			.setDefaultValue(defaultValue)
+			.setParameters(parameters);
+	}
+}


[4/5] wicket git commit: Minor non-functional improvements:

Posted by mg...@apache.org.
Minor non-functional improvements:

- use SLF4J placeholders
- fix a typo in error message
- simplify condition


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

Branch: refs/heads/master
Commit: 608704669faa9a4753d445a204c39bca963df3ef
Parents: cdf9a73
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Wed May 27 08:40:07 2015 +0300
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Wed May 27 08:41:37 2015 +0300

----------------------------------------------------------------------
 .../apache/wicket/core/util/resource/UrlResourceStream.java    | 2 +-
 .../wicket/core/util/resource/WebExternalResourceStream.java   | 2 +-
 .../org/apache/wicket/util/resource/ZipResourceStream.java     | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/60870466/wicket-core/src/main/java/org/apache/wicket/core/util/resource/UrlResourceStream.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/core/util/resource/UrlResourceStream.java b/wicket-core/src/main/java/org/apache/wicket/core/util/resource/UrlResourceStream.java
index e9d751c..cb905df 100644
--- a/wicket-core/src/main/java/org/apache/wicket/core/util/resource/UrlResourceStream.java
+++ b/wicket-core/src/main/java/org/apache/wicket/core/util/resource/UrlResourceStream.java
@@ -219,7 +219,7 @@ public class UrlResourceStream extends AbstractResourceStream
 		}
 		catch (IOException e)
 		{
-			log.warn("getLastModified for " + url + " failed: " + e.getMessage());
+			log.warn("getLastModified() for '{}' failed: {}", url, e.getMessage());
 
 			// allow modification watcher to detect the problem
 			return null;

http://git-wip-us.apache.org/repos/asf/wicket/blob/60870466/wicket-core/src/main/java/org/apache/wicket/core/util/resource/WebExternalResourceStream.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/core/util/resource/WebExternalResourceStream.java b/wicket-core/src/main/java/org/apache/wicket/core/util/resource/WebExternalResourceStream.java
index 3991b28..9697a18 100644
--- a/wicket-core/src/main/java/org/apache/wicket/core/util/resource/WebExternalResourceStream.java
+++ b/wicket-core/src/main/java/org/apache/wicket/core/util/resource/WebExternalResourceStream.java
@@ -88,7 +88,7 @@ public class WebExternalResourceStream extends AbstractResourceStream
 			if (resourceURL == null)
 			{
 				throw new FileNotFoundException("Unable to find resource '" + url +
-					"' in the serlvet context");
+					"' in the servlet context");
 			}
 
 			return Connections.getLastModified(resourceURL);

http://git-wip-us.apache.org/repos/asf/wicket/blob/60870466/wicket-util/src/main/java/org/apache/wicket/util/resource/ZipResourceStream.java
----------------------------------------------------------------------
diff --git a/wicket-util/src/main/java/org/apache/wicket/util/resource/ZipResourceStream.java b/wicket-util/src/main/java/org/apache/wicket/util/resource/ZipResourceStream.java
index 0be44ae..cea2a45 100644
--- a/wicket-util/src/main/java/org/apache/wicket/util/resource/ZipResourceStream.java
+++ b/wicket-util/src/main/java/org/apache/wicket/util/resource/ZipResourceStream.java
@@ -129,7 +129,7 @@ public class ZipResourceStream extends AbstractResourceStream
 		String[] files = dir.list();
 
 		int BUFFER = 2048;
-		BufferedInputStream origin = null;
+		BufferedInputStream origin;
 		byte data[] = new byte[BUFFER];
 
 		for (String file : files)
@@ -141,7 +141,7 @@ public class ZipResourceStream extends AbstractResourceStream
 			File f = new File(dir, file);
 			if (f.isDirectory())
 			{
-				if (recursive == true)
+				if (recursive)
 				{
 					zipDir(f, out, path + f.getName() + "/", recursive);
 				}
@@ -215,4 +215,4 @@ public class ZipResourceStream extends AbstractResourceStream
 	{
 		return null;
 	}
-}
\ No newline at end of file
+}


[2/5] wicket git commit: Minor non-functional improvements:

Posted by mg...@apache.org.
Minor non-functional improvements:

- use SLF4J placeholders
- fix a typo in error message
- simplify condition


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

Branch: refs/heads/master
Commit: a30f3caf079f6b8ab45a515b0ddfcfc53df91103
Parents: 9f08f56
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Wed May 27 08:40:07 2015 +0300
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Wed May 27 08:41:08 2015 +0300

----------------------------------------------------------------------
 .../apache/wicket/core/util/resource/UrlResourceStream.java    | 2 +-
 .../wicket/core/util/resource/WebExternalResourceStream.java   | 2 +-
 .../org/apache/wicket/util/resource/ZipResourceStream.java     | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/a30f3caf/wicket-core/src/main/java/org/apache/wicket/core/util/resource/UrlResourceStream.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/core/util/resource/UrlResourceStream.java b/wicket-core/src/main/java/org/apache/wicket/core/util/resource/UrlResourceStream.java
index e9d751c..cb905df 100644
--- a/wicket-core/src/main/java/org/apache/wicket/core/util/resource/UrlResourceStream.java
+++ b/wicket-core/src/main/java/org/apache/wicket/core/util/resource/UrlResourceStream.java
@@ -219,7 +219,7 @@ public class UrlResourceStream extends AbstractResourceStream
 		}
 		catch (IOException e)
 		{
-			log.warn("getLastModified for " + url + " failed: " + e.getMessage());
+			log.warn("getLastModified() for '{}' failed: {}", url, e.getMessage());
 
 			// allow modification watcher to detect the problem
 			return null;

http://git-wip-us.apache.org/repos/asf/wicket/blob/a30f3caf/wicket-core/src/main/java/org/apache/wicket/core/util/resource/WebExternalResourceStream.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/core/util/resource/WebExternalResourceStream.java b/wicket-core/src/main/java/org/apache/wicket/core/util/resource/WebExternalResourceStream.java
index 3991b28..9697a18 100644
--- a/wicket-core/src/main/java/org/apache/wicket/core/util/resource/WebExternalResourceStream.java
+++ b/wicket-core/src/main/java/org/apache/wicket/core/util/resource/WebExternalResourceStream.java
@@ -88,7 +88,7 @@ public class WebExternalResourceStream extends AbstractResourceStream
 			if (resourceURL == null)
 			{
 				throw new FileNotFoundException("Unable to find resource '" + url +
-					"' in the serlvet context");
+					"' in the servlet context");
 			}
 
 			return Connections.getLastModified(resourceURL);

http://git-wip-us.apache.org/repos/asf/wicket/blob/a30f3caf/wicket-util/src/main/java/org/apache/wicket/util/resource/ZipResourceStream.java
----------------------------------------------------------------------
diff --git a/wicket-util/src/main/java/org/apache/wicket/util/resource/ZipResourceStream.java b/wicket-util/src/main/java/org/apache/wicket/util/resource/ZipResourceStream.java
index 0be44ae..cea2a45 100644
--- a/wicket-util/src/main/java/org/apache/wicket/util/resource/ZipResourceStream.java
+++ b/wicket-util/src/main/java/org/apache/wicket/util/resource/ZipResourceStream.java
@@ -129,7 +129,7 @@ public class ZipResourceStream extends AbstractResourceStream
 		String[] files = dir.list();
 
 		int BUFFER = 2048;
-		BufferedInputStream origin = null;
+		BufferedInputStream origin;
 		byte data[] = new byte[BUFFER];
 
 		for (String file : files)
@@ -141,7 +141,7 @@ public class ZipResourceStream extends AbstractResourceStream
 			File f = new File(dir, file);
 			if (f.isDirectory())
 			{
-				if (recursive == true)
+				if (recursive)
 				{
 					zipDir(f, out, path + f.getName() + "/", recursive);
 				}
@@ -215,4 +215,4 @@ public class ZipResourceStream extends AbstractResourceStream
 	{
 		return null;
 	}
-}
\ No newline at end of file
+}