Skip to content

Commit 2c11c07

Browse files
authored
feat: drop Guava dependency (#823)
1 parent c74f64e commit 2c11c07

3 files changed

Lines changed: 3 additions & 11 deletions

File tree

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ multiJvm {
1616
}
1717

1818
dependencies {
19-
implementation(libs.guava)
19+
compileOnly(libs.jsr305)
2020
testCompileOnly(libs.spotbugs.annotations)
2121
testImplementation(libs.junit4)
2222
}

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[libraries]
2-
guava = "com.google.guava:guava:33.4.0-jre"
32
junit4 = "junit:junit:4.13.2"
43
spotbugs-annotations = "com.github.spotbugs:spotbugs-annotations:4.8.6"
4+
jsr305 = "com.google.code.findbugs:jsr305:3.0.2"
55

66
[plugins]
77
gitSemVer = "org.danilopianini.git-sensitive-semantic-versioning-gradle-plugin:3.1.7"

src/main/java/org/danilopianini/util/FlexibleQuadTree.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
*******************************************************************************/
77
package org.danilopianini.util;
88

9-
import com.google.common.hash.Hashing;
10-
119
import javax.annotation.Nonnull;
1210
import java.io.Serializable;
1311
import java.util.ArrayDeque;
@@ -515,14 +513,8 @@ public boolean equals(final Object obj) {
515513
}
516514

517515
@Override
518-
@SuppressWarnings("UnstableApiUsage")
519516
public int hashCode() {
520-
return Hashing.murmur3_32_fixed().newHasher()
521-
.putDouble(x)
522-
.putDouble(y)
523-
.putInt(element.hashCode())
524-
.hash()
525-
.asInt();
517+
return Objects.hash(x, y, element);
526518
}
527519

528520
public boolean isIn(final double sx, final double sy, final double fx, final double fy) {

0 commit comments

Comments
 (0)