Skip to content

Commit

Permalink
Make methods synchronized to match parent declaration (#11383)
Browse files Browse the repository at this point in the history
  • Loading branch information
sconvent authored Jan 24, 2023
1 parent 54bb276 commit d28b224
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,12 @@ public static Empty getInstance(String cacheFilePath) {
}

@Override
public Map<String, String> loadCache(int entrySize) throws IOException {
public synchronized Map<String, String> loadCache(int entrySize) throws IOException {
return Collections.emptyMap();
}

@Override
public void refreshCache(Map<String, String> properties, String comment, long maxFileSize) {
public synchronized void refreshCache(Map<String, String> properties, String comment, long maxFileSize) {
// No-op.
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ public boolean markSupported() {
}

@Override
public void mark(int readlimit) {
public synchronized void mark(int readlimit) {
is.mark(readlimit);
mMark = mPosition;
}

@Override
public void reset() throws IOException {
public synchronized void reset() throws IOException {
is.reset();
mPosition = mMark;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public int available() throws IOException {
}

@Override
public void mark(int readLimit) {
public synchronized void mark(int readLimit) {
buffer.markReaderIndex();
}

Expand Down Expand Up @@ -87,7 +87,7 @@ public int read(byte[] b, int off, int len) throws IOException {
}

@Override
public void reset() throws IOException {
public synchronized void reset() throws IOException {
buffer.resetReaderIndex();
}

Expand Down

0 comments on commit d28b224

Please sign in to comment.