Fix signed/unsigned conversion reported by Find Bugs
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 27 Sep 2008 13:41:53 +0000 (13:41 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 27 Sep 2008 13:41:53 +0000 (13:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@699644 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/jasper/xmlparser/ASCIIReader.java

index 7a13dd5..7c3ca2d 100644 (file)
@@ -112,7 +112,7 @@ public class ASCIIReader
         }
         int count = fInputStream.read(fBuffer, 0, length);
         for (int i = 0; i < count; i++) {
-            int b0 = fBuffer[i];
+            int b0 = (0xff & fBuffer[i]); // Convert to unsigned
             if (b0 > 0x80) {
                 throw new IOException(Localizer.getMessage("jsp.error.xml.invalidASCII",
                                                           Integer.toString(b0)));