Skip to content

Commit 1fd193b

Browse files
committed
Fixing nit comments.
1 parent bb322d0 commit 1fd193b

File tree

1 file changed

+5
-5
lines changed
  • firebase-installations/src/main/java/com/google/firebase/installations

1 file changed

+5
-5
lines changed

firebase-installations/src/main/java/com/google/firebase/installations/Utils.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,19 @@ class Utils {
4242
/** Length of new-format FIDs as introduced in 2019. */
4343
public static final int FID_LENGTH = 22;
4444

45-
private static final long AUTH_TOKEN_EXPIRATION_BUFFER_IN_SECS = 3600L; // 1 hour
45+
private static final long AUTH_TOKEN_EXPIRATION_BUFFER_IN_SECS = TimeUnit.HOURS.toSeconds(1);
4646

4747
Utils(Clock clock) {
4848
this.clock = clock;
4949
}
5050

5151
/**
52-
* Checks if the FIS Auth token is expired or going to expire in next 1 hour
53-
* (AUTH_TOKEN_EXPIRATION_BUFFER_IN_SECS).
52+
* Checks if the FIS Auth token is expired or going to expire in next 1 hour {@link
53+
* #AUTH_TOKEN_EXPIRATION_BUFFER_IN_SECS}.
5454
*/
5555
public boolean isAuthTokenExpired(PersistedFidEntry persistedFidEntry) {
56-
return (persistedFidEntry.getTokenCreationEpochInSecs() + persistedFidEntry.getExpiresInSecs()
57-
> currentTimeInSecs() + AUTH_TOKEN_EXPIRATION_BUFFER_IN_SECS);
56+
return persistedFidEntry.getTokenCreationEpochInSecs() + persistedFidEntry.getExpiresInSecs()
57+
> currentTimeInSecs() + AUTH_TOKEN_EXPIRATION_BUFFER_IN_SECS;
5858
}
5959

6060
/** Returns current time in seconds. */

0 commit comments

Comments
 (0)