axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eberhard Schulte <...@pixelboxx.de>
Subject Bug: axis-1.1/1.2, BoundaryDelimitedStream.java
Date Tue, 16 Mar 2004 08:48:39 GMT
Hello.

I have found a bug in axis-1.1/1.2
/org/apache/axis/attachments/BoundaryDelimitedStream.java

The implicite cast form byte to int is not correct.

      /**
       * Read from the boundary delimited stream.
       * @return The byte read, or -1 if endof stream.
       *
       * @throws java.io.IOException
       */
      public int read() throws java.io.IOException {

          byte[] b = new byte[1];    // quick and dirty. //for now
          int read = read(b);

          if (read < 0) {
              return -1;
          } else {
              // return b[0]; // wrong cast from byte to int
              return b[0] & 0xff;
          }
      }


Bye.

Schönen Gruß

Eberhard Schulte

------------------------------------------------
Eberhard Schulte
Senior Software Engineer
Pixelboxx GmbH          esc@pixelboxx.de
Ostenhellweg 56-58      http://www.pixelboxx.de/
44135 Dortmund          (02 31) 5 34 63-207
------------------------------------------------



Mime
View raw message