Skip to content

Commit

Permalink
Remove dependency on dsiutils
Browse files Browse the repository at this point in the history
  • Loading branch information
ato committed Dec 3, 2024
1 parent f37418d commit 3ae5720
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
16 changes: 2 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,20 +150,8 @@
</dependency>
<dependency>
<groupId>it.unimi.dsi</groupId>
<artifactId>dsiutils</artifactId>
<version>2.2.8</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
<!-- exclude the vulnerable commons-collections v3.2.1 -->
<exclusion>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</exclusion>
</exclusions>
<artifactId>fastutil</artifactId>
<version>7.0.10</version>
</dependency>

<!-- explicitly require a patched commons-collections to avoid vulnerable v3.2.1 -->
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/org/archive/url/UsableURIFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import gnu.inet.encoding.IDNA;
import gnu.inet.encoding.IDNAException;
import it.unimi.dsi.lang.MutableString;

import java.io.UnsupportedEncodingException;
import java.util.BitSet;
Expand Down Expand Up @@ -485,7 +484,7 @@ private String fixup(String uri, final URI base, final String charset)

// Preallocate. The '1's and '2's in below are space for ':',
// '//', etc. URI characters.
MutableString s = new MutableString(
StringBuilder s = new StringBuilder(
((uriScheme != null)? uriScheme.length(): 0)
+ 1 // ';'
+ ((uriAuthority != null)? uriAuthority.length(): 0)
Expand Down Expand Up @@ -707,7 +706,7 @@ private String checkPort(String uriAuthority)
* @param substr Suffix or prefix to use if <code>str</code> is not null.
* @param suffix True if <code>substr</code> is a suffix.
*/
private void appendNonNull(MutableString b, String str, String substr,
private void appendNonNull(StringBuilder b, String str, String substr,
boolean suffix) {
if (str != null && str.length() > 0) {
if (!suffix) {
Expand Down

0 comments on commit 3ae5720

Please sign in to comment.