We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 284c947 + 127aad8 commit 1b795daCopy full SHA for 1b795da
src/main/java/io/ipinfo/api/cache/SimpleCache.java
@@ -70,8 +70,7 @@ public boolean hasExpired() {
70
long time = expiration.addTo(creation).getLong(ChronoField.INSTANT_SECONDS);
71
long now = System.currentTimeMillis();
72
73
- if (now > time) return false;
74
- return true;
+ return now <= time;
75
}
76
77
public T getData() {
src/test/java/io/ipinfo/IPInfoTests.java
@@ -36,8 +36,6 @@ void testGoogleDNS() {
36
37
@Test
38
void testASNWithoutAuth() {
39
- assertThrows(ErrorResponseException.class, () -> {
40
- ipInfo.lookupASN("AS7922");
41
- });
+ assertThrows(ErrorResponseException.class, () -> ipInfo.lookupASN("AS7922"));
42
43
0 commit comments