MCPcopy Create free account
hub / github.com/cabaletta/baritone / validateSize

Method validateSize

src/main/java/baritone/cache/CachedChunk.java:297–301  ·  view source on GitHub ↗

Validates the size of an input BitSet containing the raw packed chunk data. Sizes that exceed CachedChunk#size are considered invalid, and thus, an exception will be thrown. @param data The raw data @throws IllegalArgumentException if the bitset size exceeds the maximum size

(BitSet data)

Source from the content-addressed store, hash-verified

295 * @throws IllegalArgumentException if the bitset size exceeds the maximum size
296 */
297 private void validateSize(BitSet data) {
298 if (data.size() > size) {
299 throw new IllegalArgumentException("BitSet of invalid length provided");
300 }
301 }
302}

Callers 1

CachedChunkMethod · 0.95

Calls 1

sizeMethod · 0.65

Tested by

no test coverage detected