diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 0df9e5ef..f234264e 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -1,10 +1,11 @@ name: Code Coverage on: + workflow_dispatch: pull_request: - push: - branches: - - master + branches: [main, develop, commons-io-downgrade, patch-1] + fork: + jobs: build: name: Coveralls diff --git a/pom.xml b/pom.xml index 496d3029..8790a6b7 100644 --- a/pom.xml +++ b/pom.xml @@ -385,7 +385,7 @@ - 2.19.0 + 2.8.0 2.0.17 5.13.3 1.7.33 diff --git a/src/main/java/crawlercommons/domains/EffectiveTldFinder.java b/src/main/java/crawlercommons/domains/EffectiveTldFinder.java index 18259ec1..21f935e5 100644 --- a/src/main/java/crawlercommons/domains/EffectiveTldFinder.java +++ b/src/main/java/crawlercommons/domains/EffectiveTldFinder.java @@ -39,7 +39,7 @@ import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; -import org.apache.commons.io.input.BoundedInputStream; +// import org.apache.commons.io.input.BoundedInputStream; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -166,8 +166,9 @@ public boolean initialize(InputStream effectiveTldDataStream) { boolean inPrivateDomainSection = false; try { int linesRead = 0, rulesRead = 0; - BoundedInputStream isCounting = BoundedInputStream.builder().setInputStream(effectiveTldDataStream).get(); - InputStream is = isCounting; + // BoundedInputStream isCounting = BoundedInputStream.builder().setInputStream(effectiveTldDataStream).get(); + // InputStream is = isCounting; + InputStream is = effectiveTldDataStream; List digests = new ArrayList<>(); try { MessageDigest md5 = MessageDigest.getInstance("MD5"); @@ -208,8 +209,9 @@ public boolean initialize(InputStream effectiveTldDataStream) { configured = true; is.close(); - long bytesRead = isCounting.getCount(); - LOGGER.info("Successfully read public suffix list: {} bytes, {} lines, {} rules", bytesRead, linesRead, rulesRead); + // long bytesRead = isCounting.getCount(); + // LOGGER.info("Successfully read public suffix list: {} bytes, {} lines, {} rules", bytesRead, linesRead, rulesRead); + LOGGER.info("Successfully read public suffix list: {} lines, {} rules", linesRead, rulesRead); for (MessageDigest digest : digests) { byte[] d = digest.digest(); BigInteger bi = new BigInteger(1, d);