@@ -82,7 +82,8 @@ public Reader(File database, FileMode fileMode) throws IOException {
8282 }
8383
8484 private Reader (BufferHolder bufferHolder , String name ) throws IOException {
85- this .bufferHolderReference = new AtomicReference <BufferHolder >(bufferHolder );
85+ this .bufferHolderReference = new AtomicReference <BufferHolder >(
86+ bufferHolder );
8687
8788 ByteBuffer buffer = bufferHolder .get ();
8889 int start = this .findMetadataStart (buffer , name );
@@ -144,7 +145,8 @@ record = this.readNode(buffer, record, bit);
144145 throw new InvalidDatabaseException ("Something bad happened" );
145146 }
146147
147- private int startNode (ByteBuffer buffer , int bitLength ) throws InvalidDatabaseException {
148+ private int startNode (ByteBuffer buffer , int bitLength )
149+ throws InvalidDatabaseException {
148150 // Check if we are looking up an IPv4 address in an IPv6 tree. If this
149151 // is the case, we can skip over the first 96 nodes.
150152 if (this .metadata .ipVersion == 6 && bitLength == 32 ) {
@@ -155,7 +157,8 @@ private int startNode(ByteBuffer buffer, int bitLength) throws InvalidDatabaseEx
155157 return 0 ;
156158 }
157159
158- private int findIpV4StartNode (ByteBuffer buffer ) throws InvalidDatabaseException {
160+ private int findIpV4StartNode (ByteBuffer buffer )
161+ throws InvalidDatabaseException {
159162 if (this .metadata .ipVersion == 4 ) {
160163 return 0 ;
161164 }
@@ -194,7 +197,8 @@ private int readNode(ByteBuffer buffer, int nodeNumber, int index)
194197 }
195198 }
196199
197- private JsonNode resolveDataPointer (ByteBuffer buffer , int pointer ) throws IOException {
200+ private JsonNode resolveDataPointer (ByteBuffer buffer , int pointer )
201+ throws IOException {
198202 int resolved = (pointer - this .metadata .nodeCount )
199203 + this .metadata .searchTreeSize ;
200204
@@ -206,8 +210,8 @@ private JsonNode resolveDataPointer(ByteBuffer buffer, int pointer) throws IOExc
206210
207211 // We only want the data from the decoder, not the offset where it was
208212 // found.
209- Decoder decoder = new Decoder (buffer ,
210- this . metadata . searchTreeSize + DATA_SECTION_SEPARATOR_SIZE );
213+ Decoder decoder = new Decoder (buffer , this . metadata . searchTreeSize
214+ + DATA_SECTION_SEPARATOR_SIZE );
211215 return decoder .decode (resolved ).getNode ();
212216 }
213217
0 commit comments