Browse Source

Pr 49279, DemuxInputStream.read() should return unsigned values

(mandated by contract of InputStream)



git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@943929 13f79535-47bb-0310-9956-ffa450edef68
master
Jacobus Martinus Kruithof 15 years ago
parent
commit
17c956a192
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/main/org/apache/tools/ant/DemuxInputStream.java

+ 2
- 1
src/main/org/apache/tools/ant/DemuxInputStream.java View File

@@ -30,6 +30,7 @@ import java.io.InputStream;
*/
public class DemuxInputStream extends InputStream {

private static final int MASK_8BIT = 0xFF;
/**
* The project to from which to get input.
*/
@@ -54,7 +55,7 @@ public class DemuxInputStream extends InputStream {
if (project.demuxInput(buffer, 0, 1) == -1) {
return -1;
}
return buffer[0];
return buffer[0] & MASK_8BIT;
}




Loading…
Cancel
Save