Skip to content

Commit

Permalink
Remove redundant signSafeMod (apache#10081) (apache#10082)
Browse files Browse the repository at this point in the history
  • Loading branch information
Technoboy- authored Mar 30, 2021
1 parent c9c1167 commit 455af30
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package org.apache.pulsar.client.impl;

import static org.apache.pulsar.common.util.netty.ChannelFutures.toCompletableFuture;
import static org.apache.pulsar.client.util.MathUtils.signSafeMod;

import com.google.common.annotations.VisibleForTesting;

Expand Down Expand Up @@ -340,14 +341,6 @@ int getPoolSize() {
return pool.values().stream().mapToInt(Map::size).sum();
}

public static int signSafeMod(long dividend, int divisor) {
int mod = (int) (dividend % divisor);
if (mod < 0) {
mod += divisor;
}
return mod;
}

private static final Logger log = LoggerFactory.getLogger(ConnectionPool.class);

}
Expand Down

0 comments on commit 455af30

Please sign in to comment.