szetszwo commented on code in PR #951:
URL: https://github.com/apache/ratis/pull/951#discussion_r1373410206
##########
ratis-client/src/main/java/org/apache/ratis/client/impl/RaftClientImpl.java:
##########
@@ -17,6 +17,7 @@
*/
package org.apache.ratis.client.impl;
+import jdk.nashorn.internal.ir.annotations.Immutable;
Review Comment:
@OneSizeFitsQuorum , sorry that I was not clear. The tag is for the class
as below:
```java
+++ b/ratis-common/src/main/java/org/apache/ratis/protocol/RaftPeerId.java
@@ -22,6 +22,7 @@ import
org.apache.ratis.thirdparty.com.google.protobuf.ByteString;
import org.apache.ratis.util.JavaUtils;
import org.apache.ratis.util.Preconditions;
+import javax.annotation.concurrent.Immutable;
import java.nio.charset.StandardCharsets;
import java.util.Map;
import java.util.Objects;
@@ -33,6 +34,7 @@ import java.util.function.Supplier;
* <p>
* This is a value-based class.
*/
+@Immutable
public final class RaftPeerId {
private static final Map<ByteString, RaftPeerId> BYTE_STRING_MAP = new
ConcurrentHashMap<>();
private static final Map<String, RaftPeerId> STRING_MAP = new
ConcurrentHashMap<>();
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]