Fixed incorrect log message when getLink() is called with the wrong number of parameters. This would only be the case if a user is using the AssetService with a custom IAsset implementation.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/tapestry/branches/branch-3-0@244183 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/org/apache/tapestry/asset/AssetService.java b/framework/src/org/apache/tapestry/asset/AssetService.java
index a695a27..8872c6d 100644
--- a/framework/src/org/apache/tapestry/asset/AssetService.java
+++ b/framework/src/org/apache/tapestry/asset/AssetService.java
@@ -38,8 +38,8 @@
*
* <p>The retrieval part is directly linked to {@link PrivateAsset}.
* The service responds to a URL that encodes the path of a resource
- * within the classpath. The
- * {@link #service(IEngineServiceView, IRequestCycle, ResponseOutputStream)}
+ * within the classpath. The
+ * {@link #service(IEngineServiceView, IRequestCycle, ResponseOutputStream)}
* method reads the resource and streams it out.
*
* <p>TBD: Security issues. Should only be able to retrieve a
@@ -86,7 +86,7 @@
{
if (Tapestry.size(parameters) != 2)
throw new ApplicationRuntimeException(
- Tapestry.format("service-single-parameter", Tapestry.ASSET_SERVICE));
+ Tapestry.format("service-incorrect-parameter-count", Tapestry.ASSET_SERVICE, new Integer(2)));
// Service is stateless
@@ -146,13 +146,13 @@
Tapestry.format("missing-resource", resourcePath));
String actualChecksum = engine.getResourceChecksumSource().getChecksum(resourceURL);
-
+
if (!actualChecksum.equals(checksum))
{
throw new ApplicationRuntimeException(
Tapestry.format("AssetService.checksum-failure", checksum, resourcePath));
}
-
+
URLConnection resourceConnection = resourceURL.openConnection();
ServletContext servletContext = cycle.getRequestContext().getServlet().getServletContext();