pnicolucci closed pull request #14: MYFACES-4249: Don't call charAt more than
needed
URL: https://github.com/apache/myfaces/pull/14
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java
b/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java
index 155d17882..a72403036 100644
--- a/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java
+++ b/impl/src/main/java/org/apache/myfaces/util/CDataEndEscapeFilterWriter.java
@@ -69,7 +69,7 @@ public void write(char[] cbuf, int off, int len) throws
IOException
out.write("<![CDATA[]]]]><![CDATA[>");
}
c1 = c2;
- c2 = (char) cbuf[off+i];
+ c2 = c;
pos++;
}
if (index < off+len)
@@ -92,7 +92,7 @@ public void write(String str, int off, int len) throws
IOException
out.write("<![CDATA[]]]]><![CDATA[>");
}
c1 = c2;
- c2 = (char) str.charAt(off+i);
+ c2 = c;
pos++;
}
if (index < off+len)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services