Skip to content

Commit

Permalink
Remove plexus-utils, javax.xml; add guava
Browse files Browse the repository at this point in the history
  • Loading branch information
chonton committed Jun 14, 2019
1 parent 6409f85 commit 41a3eb4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
12 changes: 6 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@

<dependencies>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>25.1-android</version>
</dependency>

<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
Expand Down Expand Up @@ -114,12 +120,6 @@
<version>3.2.0</version>
</dependency>

<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.1.1</version>
</dependency>

<dependency>
<groupId>org.eclipse.sisu</groupId>
<artifactId>org.eclipse.sisu.plexus</artifactId>
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/org/honton/chas/exists/CheckSum.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package org.honton.chas.exists;

import com.google.common.io.BaseEncoding;
import com.google.common.io.Closeables;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import javax.xml.bind.DatatypeConverter;
import org.codehaus.plexus.util.IOUtil;

/**
Expand All @@ -27,9 +28,9 @@ public String getChecksum(File file) throws IOException {
try {
digest.reset();
readStream(fis);
return DatatypeConverter.printHexBinary(digest.digest());
return BaseEncoding.base16().encode(digest.digest());
} finally {
IOUtil.close(fis);
Closeables.closeQuietly(fis);
}
}

Expand Down

0 comments on commit 41a3eb4

Please sign in to comment.