MCPcopy Create free account
hub / github.com/apache/kafka / abs

Method abs

clients/src/main/java/org/apache/kafka/common/utils/Utils.java:162–164  ·  view source on GitHub ↗

Get the absolute value of the given number. If the number is Int.MinValue return 0. This is different from java.lang.Math.abs or scala.math.abs in that they return Int.MinValue (!).

(int n)

Source from the content-addressed store, hash-verified

160 * java.lang.Math.abs or scala.math.abs in that they return Int.MinValue (!).
161 */
162 public static int abs(int n) {
163 return n & 0x7fffffff;
164 }
165
166 /**
167 * Get the length for UTF8-encoding a string without encoding it first

Callers 2

leastLoadedNodeMethod · 0.95
partitionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected