diff --git a/sentinel-cluster/sentinel-cluster-server-envoy-rls/src/main/java/com/alibaba/csp/sentinel/cluster/server/envoy/rls/rule/EnvoySentinelRuleConverter.java b/sentinel-cluster/sentinel-cluster-server-envoy-rls/src/main/java/com/alibaba/csp/sentinel/cluster/server/envoy/rls/rule/EnvoySentinelRuleConverter.java index a7e65b17..8ae33c2c 100644 --- a/sentinel-cluster/sentinel-cluster-server-envoy-rls/src/main/java/com/alibaba/csp/sentinel/cluster/server/envoy/rls/rule/EnvoySentinelRuleConverter.java +++ b/sentinel-cluster/sentinel-cluster-server-envoy-rls/src/main/java/com/alibaba/csp/sentinel/cluster/server/envoy/rls/rule/EnvoySentinelRuleConverter.java @@ -69,7 +69,7 @@ public final class EnvoySentinelRuleConverter { return -1L; } // Add offset to avoid negative ID. - return Integer.MAX_VALUE + key.hashCode(); + return (long) Integer.MAX_VALUE + key.hashCode(); } public static String generateKey(String domain, EnvoyRlsRule.ResourceDescriptor descriptor) {