Skip to content

Commit 7ce3cab

Browse files
author
Petr Shevtsov
committed
Simplify if statement
1 parent 2862eca commit 7ce3cab

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
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() {

0 commit comments

Comments
 (0)