Clean up a few lint warnings (#1324)

The build is generating the following lint warnings:

core/src/main/java/google/registry/flows/certs/CertificateChecker.java:246:
warning: [ReferenceEquality] Compariso
n using reference equality instead of value equality
        && (lastExpiringNotificationSentDate == START_OF_TIME
                                             ^
    (see https://errorprone.info/bugpattern/ReferenceEquality)
core/src/test/java/google/registry/backup/ReplayCommitLogsToSqlActionTest.java:350:
warning: [UnnecessaryParenthes
es] These grouping parentheses are unnecessary; it is unlikely the code will
be misinterpreted without them
        .that(jpaTm().transact((() -> jpaTm().loadByEntity(contactResource))))
This commit is contained in:
Michael Muller 2021-09-17 09:15:48 -04:00 committed by GitHub
parent 1d14e96c9b
commit 93b4b03322
2 changed files with 2 additions and 2 deletions

View file

@ -243,7 +243,7 @@ public class CertificateChecker {
* lastExpiringNotificationSentDate is greater than expirationWarningIntervalDays.
*/
return !lastValidDate.after(now.plusDays(expirationWarningDays).toDate())
&& (lastExpiringNotificationSentDate == START_OF_TIME
&& (lastExpiringNotificationSentDate.equals(START_OF_TIME)
|| !lastExpiringNotificationSentDate
.plusDays(expirationWarningIntervalDays)
.toDate()

View file

@ -347,7 +347,7 @@ public class ReplayCommitLogsToSqlActionTest {
mutation);
runAndAssertSuccess(persistenceTime.minusMinutes(1), 1, 1);
assertAboutImmutableObjects()
.that(jpaTm().transact((() -> jpaTm().loadByEntity(contactResource))))
.that(jpaTm().transact(() -> jpaTm().loadByEntity(contactResource)))
.isEqualExceptFields(contactResource, "revisions");
}