Author: markt
Date: Tue Feb 21 14:09:38 2006
New Revision: 379601
URL: http://svn.apache.org/viewcvs?rev=379601&view=rev
Log:
Minor code clean-up. No functional change.
Modified:
tomcat/jasper/branches/tc4.1.x/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java
Modified:
tomcat/jasper/branches/tc4.1.x/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java
URL:
http://svn.apache.org/viewcvs/tomcat/jasper/branches/tc4.1.x/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java?rev=379601&r1=379600&r2=379601&view=diff
==============================================================================
---
tomcat/jasper/branches/tc4.1.x/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java
(original)
+++
tomcat/jasper/branches/tc4.1.x/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java
Tue Feb 21 14:09:38 2006
@@ -205,7 +205,6 @@
if(t.equals(String.class)) {
method.invoke(bean, new Object[] { values });
} else {
- Object tmpval = null;
createTypedArray (prop, bean, method, values, t,
propertyEditorClass);
}
@@ -417,37 +416,35 @@
* @param encoded The string to decode.
* @return The decoded string.
*/
-
public static String decode(String encoded) {
// speedily leave if we're not needed
- if (encoded == null) return null;
+ if (encoded == null) return null;
if (encoded.indexOf('%') == -1 && encoded.indexOf('+') == -1)
- return encoded;
+ return encoded;
- //allocate the buffer - use byte[] to avoid calls to new.
+ //allocate the buffer - use byte[] to avoid calls to new.
byte holdbuffer[] = new byte[encoded.length()];
- char holdchar;
int bufcount = 0;
for (int count = 0; count < encoded.length(); count++) {
char cur = encoded.charAt(count);
if (cur == '%') {
- holdbuffer[bufcount++] =
- (byte)Integer.parseInt(encoded.substring(count+1,count+3),16);
+ holdbuffer[bufcount++] =
+
(byte)Integer.parseInt(encoded.substring(count+1,count+3),16);
if (count + 2 >= encoded.length())
count = encoded.length();
else
count += 2;
} else if (cur == '+') {
- holdbuffer[bufcount++] = (byte) ' ';
- } else {
- holdbuffer[bufcount++] = (byte) cur;
+ holdbuffer[bufcount++] = (byte) ' ';
+ } else {
+ holdbuffer[bufcount++] = (byte) cur;
}
}
// REVISIT -- remedy for Deprecated warning.
- //return new String(holdbuffer,0,0,bufcount);
- return new String(holdbuffer,0,bufcount);
+ //return new String(holdbuffer,0,0,bufcount);
+ return new String(holdbuffer,0,bufcount);
}
// __begin lookupReadMethodMethod
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]