use synchronized for methods that override synchronized methods

This commit is contained in:
Hans-Christoph Steiner committed 2021-06-14 16:36:42 +02:00
1 parent a02ba42cf9
commit 43a809490c
2 files changed
+2 -2

No files matched your search

@@ -24,7 +24,7 @@ class ProgressBufferedInputStream extends BufferedInputStream {
}
@Override
public int read(@NonNull byte[] buffer, int byteOffset, int byteCount) throws IOException {
public synchronized int read(@NonNull byte[] buffer, int byteOffset, int byteCount) throws IOException {
if (progressListener != null) {
currentBytes += byteCount;
/* don't send every change to keep things efficient. 333333 bytes to keep all
@@ -256,7 +256,7 @@ public abstract class Downloader {
}
@Override
public void mark(int readlimit) {
public synchronized void mark(int readlimit) {
toWrap.mark(readlimit);
}