Repository: jclouds Updated Branches: refs/heads/master 89e102810 -> 11640b6c2
Correct RandomByteSource.read return value Previously read returned a value between -128 and 127. -1 indicates end of stream, causing issues for callers. Instead return values between 0 and 255 as intended. Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/11640b6c Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/11640b6c Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/11640b6c Branch: refs/heads/master Commit: 11640b6c2e08a1e34c6d490bd0aee91e66b62d95 Parents: 89e1028 Author: Andrew Gaul <[email protected]> Authored: Thu Jan 4 15:12:29 2018 -0800 Committer: Andrew Gaul <[email protected]> Committed: Thu Jan 4 15:12:29 2018 -0800 ---------------------------------------------------------------------- core/src/test/java/org/jclouds/utils/TestUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/jclouds/blob/11640b6c/core/src/test/java/org/jclouds/utils/TestUtils.java ---------------------------------------------------------------------- diff --git a/core/src/test/java/org/jclouds/utils/TestUtils.java b/core/src/test/java/org/jclouds/utils/TestUtils.java index 122f471..cdf66cf 100644 --- a/core/src/test/java/org/jclouds/utils/TestUtils.java +++ b/core/src/test/java/org/jclouds/utils/TestUtils.java @@ -70,7 +70,8 @@ public class TestUtils { if (closed) { throw new IOException("Stream already closed"); } - return (byte) random.nextInt(); + // return value between 0 and 255 + return random.nextInt() & 0xff; } @Override
