Skip to content

Commit 1b795da

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 284c947 + 127aad8 commit 1b795da

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/main/java/io/ipinfo/api/cache/SimpleCache.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ public boolean hasExpired() {
7070
long time = expiration.addTo(creation).getLong(ChronoField.INSTANT_SECONDS);
7171
long now = System.currentTimeMillis();
7272

73-
if (now > time) return false;
74-
return true;
73+
return now <= time;
7574
}
7675

7776
public T getData() {

src/test/java/io/ipinfo/IPInfoTests.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ void testGoogleDNS() {
3636

3737
@Test
3838
void testASNWithoutAuth() {
39-
assertThrows(ErrorResponseException.class, () -> {
40-
ipInfo.lookupASN("AS7922");
41-
});
39+
assertThrows(ErrorResponseException.class, () -> ipInfo.lookupASN("AS7922"));
4240
}
4341
}

0 commit comments

Comments
 (0)