Skip to content

Commit c914311

Browse files
vjkoskelaBrandonArp
authored andcommitted
Remove commons codec usage and dependency. (#87)
1 parent 79e25f8 commit c914311

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@
7979
<aspectjrt.version>1.8.9</aspectjrt.version>
8080
<cglib.version>3.2.5</cglib.version>
8181
<client.protocol.version>0.10.0</client.protocol.version>
82-
<commons.codec.version>1.10</commons.codec.version>
8382
<commons.io.version>2.4</commons.io.version>
8483
<fastutil.version>8.1.1</fastutil.version>
8584
<findbugs.annotations.version>3.0.1</findbugs.annotations.version>
@@ -603,11 +602,6 @@
603602
<artifactId>commons-io</artifactId>
604603
<version>${commons.io.version}</version>
605604
</dependency>
606-
<dependency>
607-
<groupId>commons-codec</groupId>
608-
<artifactId>commons-codec</artifactId>
609-
<version>${commons.codec.version}</version>
610-
</dependency>
611605
<dependency>
612606
<groupId>org.reflections</groupId>
613607
<artifactId>reflections</artifactId>

src/main/java/com/arpnetworking/metrics/common/tailer/StatefulTailer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import com.arpnetworking.utility.Trigger;
2525
import com.google.common.base.MoreObjects;
2626
import net.sf.oval.constraint.NotNull;
27-
import org.apache.commons.codec.binary.Hex;
2827
import org.apache.commons.io.IOUtils;
2928
import org.joda.time.Duration;
3029

@@ -41,6 +40,7 @@
4140
import java.security.NoSuchAlgorithmException;
4241
import java.util.Objects;
4342
import java.util.Optional;
43+
import javax.xml.bind.DatatypeConverter;
4444

4545
/**
4646
* A reimplementation of the Apache Commons IO tailer based on the 2.5 snapshot
@@ -480,7 +480,7 @@ private Optional<String> computeHash(final SeekableByteChannel reader, final int
480480
// Compute the hash
481481
_md5.reset();
482482
final byte[] digest = _md5.digest(buffer.array());
483-
final String hash = Hex.encodeHexString(digest);
483+
final String hash = DatatypeConverter.printHexBinary(digest);
484484
LOGGER.trace()
485485
.setMessage("Computed hash")
486486
.addData("hash", hash)

0 commit comments

Comments
 (0)