You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2023/01/24 12:52:04 UTC
[dubbo] branch 3.2 updated: Make methods synchronized to match parent declaration (#11383)
This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.2
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.2 by this push:
new d28b2244ef Make methods synchronized to match parent declaration (#11383)
d28b2244ef is described below
commit d28b2244eff738b1f8efa2a9f6e86b61f25b182a
Author: Simon Convent <sc...@users.noreply.github.com>
AuthorDate: Tue Jan 24 13:51:56 2023 +0100
Make methods synchronized to match parent declaration (#11383)
---
.../src/main/java/org/apache/dubbo/common/cache/FileCacheStore.java | 4 ++--
.../src/main/java/org/apache/dubbo/common/io/StreamUtils.java | 4 ++--
.../org/apache/dubbo/remoting/buffer/ChannelBufferInputStream.java | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/cache/FileCacheStore.java b/dubbo-common/src/main/java/org/apache/dubbo/common/cache/FileCacheStore.java
index 84601ef4ea..0d4eb98da1 100644
--- a/dubbo-common/src/main/java/org/apache/dubbo/common/cache/FileCacheStore.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/common/cache/FileCacheStore.java
@@ -218,12 +218,12 @@ public class FileCacheStore {
}
@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.
}
}
diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/io/StreamUtils.java b/dubbo-common/src/main/java/org/apache/dubbo/common/io/StreamUtils.java
index f3a212a592..bc0f958792 100644
--- a/dubbo-common/src/main/java/org/apache/dubbo/common/io/StreamUtils.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/common/io/StreamUtils.java
@@ -94,13 +94,13 @@ public class StreamUtils {
}
@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;
}
diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/buffer/ChannelBufferInputStream.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/buffer/ChannelBufferInputStream.java
index 011510486e..8e64eaa01d 100644
--- a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/buffer/ChannelBufferInputStream.java
+++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/buffer/ChannelBufferInputStream.java
@@ -57,7 +57,7 @@ public class ChannelBufferInputStream extends InputStream {
}
@Override
- public void mark(int readLimit) {
+ public synchronized void mark(int readLimit) {
buffer.markReaderIndex();
}
@@ -87,7 +87,7 @@ public class ChannelBufferInputStream extends InputStream {
}
@Override
- public void reset() throws IOException {
+ public synchronized void reset() throws IOException {
buffer.resetReaderIndex();
}