Summary
In the java.io package, remove the synchronized keyword from the mark(int) and reset() methods of the PushbackInputStream class.
Problem
For the indicated methods, the synchronized keyword does not appear to add any value.
Solution
Remove the synchronized keyword from the declarations of the indicated methods.
Specification
--- a/src/java.base/share/classes/java/io/PushbackInputStream.java
+++ b/src/java.base/share/classes/java/io/PushbackInputStream.java
@@ -345,7 +345,7 @@ public class PushbackInputStream extends FilterInputStream {
* the mark position becomes invalid.
* @see java.io.InputStream#reset()
*/
- public synchronized void mark(int readlimit) {
+ public void mark(int readlimit) {
}
/**
@@ -360,7 +360,7 @@ public class PushbackInputStream extends FilterInputStream {
* @see java.io.InputStream#mark(int)
* @see java.io.IOException
*/
- public synchronized void reset() throws IOException {
+ public void reset() throws IOException {
throw new IOException("mark/reset not supported");
}
- csr of
-
JDK-8285745 Re-examine PushbackInputStream mark/reset
-
- Resolved
-
- relates to
-
JDK-8285286 Re-examine FilterInputStream mark/reset
-
- Closed
-