You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by iv...@apache.org on 2008/06/17 19:00:41 UTC

svn commit: r668744 - in /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/resource: IResourceStream.java StringResourceStream.java

Author: ivaynberg
Date: Tue Jun 17 10:00:41 2008
New Revision: 668744

URL: http://svn.apache.org/viewvc?rev=668744&view=rev
Log:
WICKET-1704

Modified:
    wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/resource/IResourceStream.java
    wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/resource/StringResourceStream.java

Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/resource/IResourceStream.java
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/resource/IResourceStream.java?rev=668744&r1=668743&r2=668744&view=diff
==============================================================================
--- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/resource/IResourceStream.java (original)
+++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/resource/IResourceStream.java Tue Jun 17 10:00:41 2008
@@ -50,7 +50,9 @@
 	String getContentType();
 
 	/**
-	 * Gets the size of this resource
+	 * Gets the size of this resource in bytes
+	 * 
+	 * TODO 1.5: rename to lengthInBytes() or let it return some sort of size object
 	 * 
 	 * @return The size of this resource in the number of bytes, or -1 if unknown
 	 */

Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/resource/StringResourceStream.java
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/resource/StringResourceStream.java?rev=668744&r1=668743&r2=668744&view=diff
==============================================================================
--- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/resource/StringResourceStream.java (original)
+++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/resource/StringResourceStream.java Tue Jun 17 10:00:41 2008
@@ -85,7 +85,9 @@
 	 */
 	public long length()
 	{
-		return string.length();
+		// WICKET-1705: we cannot use string.length() because we need number of bytes rather then
+		// number of characters
+		return string.toString().getBytes().length;
 	}
 
 }