You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2004/11/23 01:08:30 UTC

cvs commit: ws-axis/java/src/org/apache/axis/attachments DimeDelimitedInputStream.java

dims        2004/11/22 16:08:30

  Modified:    java/src/org/apache/axis/attachments
                        DimeDelimitedInputStream.java
  Log:
  Fix for AXIS-1676 - SAXParseException for message containing more than 2 bytes UTF-8 chars and DIME Attachment
  from Damien (apache-jira@ootoogo.com)
  
  Revision  Changes    Path
  1.18      +3 -2      ws-axis/java/src/org/apache/axis/attachments/DimeDelimitedInputStream.java
  
  Index: DimeDelimitedInputStream.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/attachments/DimeDelimitedInputStream.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- DimeDelimitedInputStream.java	25 Feb 2004 14:02:30 -0000	1.17
  +++ DimeDelimitedInputStream.java	23 Nov 2004 00:08:30 -0000	1.18
  @@ -456,8 +456,9 @@
           byte[] b = new byte[1];
           int read = read(b, 0, 1);
   
  -        if (read < 0) return -1; // fixme: should we also check for read != 1?
  -        else return b[0];
  +        if (read < 0)
  +            return -1; // fixme: should we also check for read != 1?
  +        return (b[0] & 0xff); // convert byte value to a positive int
       }
   
       /**