Skip to content

Commit

Permalink
fix (core): Explicit type instead of var might help DeepSource JAVA-E…
Browse files Browse the repository at this point in the history
…1036 false positive
  • Loading branch information
vorburger committed Mar 7, 2025
1 parent 843f79c commit d579570
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions java/dev/enola/common/io/iri/IRITest.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void equalsOfDifferentFrom() {
@Test
public void mapRemove1() {
var map = new HashMap<IRI, String>();
var iri = IRI.from("https://enola.dev/tika/", "author");
IRI iri = IRI.from("https://enola.dev/tika/", "author");
map.put(iri, "hi");
assertThat(map.remove(iri)).isEqualTo("hi");
assertThat(map).isEmpty();
Expand All @@ -57,10 +57,10 @@ public void mapRemove1() {
@Test
public void mapRemove2() {
var map = new HashMap<IRI, String>();
var iri1 = IRI.from("https://enola.dev/tika/", "author");
IRI iri1 = IRI.from("https://enola.dev/tika/", "author");
map.put(iri1, "hi");

var iri2 = IRI.from("https://enola.dev/tika/", "author");
IRI iri2 = IRI.from("https://enola.dev/tika/", "author");
assertThat(map.remove(iri2)).isEqualTo("hi");
assertThat(map).isEmpty();
}
Expand Down

0 comments on commit d579570

Please sign in to comment.