Skip to content

Commit 5213ea8

Browse files
committed
Limit visibility
1 parent 0097414 commit 5213ea8

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

src/main/java/com/maxmind/maxminddb/Decoder.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import com.fasterxml.jackson.databind.node.ObjectNode;
1818
import com.fasterxml.jackson.databind.node.TextNode;
1919

20-
public final class Decoder {
20+
final class Decoder {
2121

2222
private final boolean DEBUG;
2323
// XXX - This is only for unit testings. We should possibly make a
@@ -72,14 +72,14 @@ void setOffset(long offset) {
7272

7373
}
7474

75-
public Decoder(ThreadBuffer threadBuffer, long pointerBase) {
75+
Decoder(ThreadBuffer threadBuffer, long pointerBase) {
7676
this.pointerBase = pointerBase;
7777
this.threadBuffer = threadBuffer;
7878
this.objectMapper = new ObjectMapper();
7979
this.DEBUG = System.getenv().get("MAXMIND_DB_DECODER_DEBUG") != null;
8080
}
8181

82-
public Result decode(long offset) throws MaxMindDbException, IOException {
82+
Result decode(long offset) throws MaxMindDbException, IOException {
8383
ByteBuffer buffer = this.threadBuffer.get();
8484

8585
buffer.position((int) offset);
@@ -237,11 +237,11 @@ private String decodeString(int size) {
237237
return Charset.forName("UTF-8").decode(buffer).toString();
238238
}
239239

240-
IntNode decodeUint16(int size) {
240+
private IntNode decodeUint16(int size) {
241241
return new IntNode(this.decodeInteger(size));
242242
}
243243

244-
IntNode decodeInt32(int size) {
244+
private IntNode decodeInt32(int size) {
245245
return new IntNode(this.decodeInteger(size));
246246
}
247247

@@ -254,15 +254,15 @@ private int decodeInteger(int size) {
254254
return integer;
255255
}
256256

257-
LongNode decodeUint32(int size) {
257+
private LongNode decodeUint32(int size) {
258258
return new LongNode(this.decodeLong(size));
259259
}
260260

261-
long decodeLong(int size) {
261+
private long decodeLong(int size) {
262262
return this.decodeLong(0, size);
263263
}
264264

265-
long decodeLong(long base, int size) {
265+
private long decodeLong(long base, int size) {
266266
ByteBuffer buffer = this.threadBuffer.get();
267267
return Decoder.decodeLong(buffer, base, size);
268268
}
@@ -276,7 +276,7 @@ static long decodeLong(ByteBuffer buffer, long base, int size) {
276276
return longInt;
277277
}
278278

279-
BigIntegerNode decodeBigInteger(int size) {
279+
private BigIntegerNode decodeBigInteger(int size) {
280280
byte[] bytes = this.getByteArray(size);
281281
return new BigIntegerNode(new BigInteger(1, bytes));
282282
}

src/main/java/com/maxmind/maxminddb/Reader.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ public JsonNode get(InetAddress address) throws MaxMindDbException,
8282
return this.resolveDataPointer(pointer);
8383
}
8484

85-
long findAddressInTree(InetAddress address) throws MaxMindDbException {
85+
private long findAddressInTree(InetAddress address)
86+
throws MaxMindDbException {
8687
byte[] rawAddress = address.getAddress();
8788

8889
if (this.DEBUG) {

0 commit comments

Comments
 (0)