use synchronized for methods that override synchronized methods

This commit is contained in:
Hans-Christoph Steiner 2021-06-09 18:41:31 +02:00
parent a02ba42cf9
commit 43a809490c
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -256,7 +256,7 @@ public abstract class Downloader {
}
@Override
public void mark(int readlimit) {
public synchronized void mark(int readlimit) {
toWrap.mark(readlimit);
}