Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/main/java/dev/sorn/fmp4j/types/FmpYear.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import static java.lang.String.valueOf;
import static java.util.Objects.compare;

import dev.sorn.fmp4j.exceptions.FmpInvalidSymbolException;
import dev.sorn.fmp4j.exceptions.FmpInvalidYearException;
import java.io.Serial;

Expand Down Expand Up @@ -71,7 +70,7 @@ public boolean equals(Object obj) {
@Override
public int compareTo(FmpYear that) {
if (that == null) {
throw new FmpInvalidSymbolException("'that.value' is required");
throw new FmpInvalidYearException("'that.value' is required");
}
return compare(this.value, that.value, Integer::compareTo);
}
Expand Down
3 changes: 1 addition & 2 deletions src/test/java/dev/sorn/fmp4j/types/FmpYearTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;

import dev.sorn.fmp4j.exceptions.FmpInvalidSymbolException;
import dev.sorn.fmp4j.exceptions.FmpInvalidYearException;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
Expand Down Expand Up @@ -146,7 +145,7 @@ void compareTo_null_throws() {
var y2 = (FmpYear) null;

// when // then
var e = assertThrows(FmpInvalidSymbolException.class, () -> y1.compareTo(y2));
var e = assertThrows(FmpInvalidYearException.class, () -> y1.compareTo(y2));
assertEquals("'that.value' is required", e.getMessage());
}

Expand Down
Loading