Skip to content

Commit 127aad8

Browse files
authored
Merge pull request #3 from ipinfo/ps/simplify-if-statement
Simplify if statement
2 parents 8a8bf57 + 7ce3cab commit 127aad8

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)