Skip to content

Commit

Permalink
8323562: SaslInputStream.read() may return wrong value
Browse files Browse the repository at this point in the history
Backport-of: 5cf7947ccd1fc56e8944c28145a9c8e71f5e1a03
  • Loading branch information
Satyen Subramaniam authored and Paul Hohensee committed Oct 23, 2024
1 parent 3660c07 commit 3146710
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -78,7 +78,7 @@ public int read() throws IOException {
byte[] inBuf = new byte[1];
int count = read(inBuf, 0, 1);
if (count > 0) {
return inBuf[0];
return inBuf[0] & 0xff;
} else {
return -1;
}
Expand Down

1 comment on commit 3146710

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.