diff --git a/dal-cluster-client/src/main/java/com/ctrip/framework/dal/cluster/client/sharding/strategy/ModShardStrategy.java b/dal-cluster-client/src/main/java/com/ctrip/framework/dal/cluster/client/sharding/strategy/ModShardStrategy.java index 3b9d3b493..33f1355ad 100644 --- a/dal-cluster-client/src/main/java/com/ctrip/framework/dal/cluster/client/sharding/strategy/ModShardStrategy.java +++ b/dal-cluster-client/src/main/java/com/ctrip/framework/dal/cluster/client/sharding/strategy/ModShardStrategy.java @@ -54,7 +54,7 @@ public Set getAllTableShards(String tableName) { protected int getModResult(int mod, Object shardValue) { long longValue = getLongValue(shardValue); - return (int) longValue % mod; + return (int) (longValue % mod); } protected Long getLongValue(Object value) {