Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make methods synchronized to match parent declaration #11383

Merged
merged 1 commit into from
Jan 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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