mirror of
https://github.com/google/nomulus
synced 2026-01-03 11:45:39 +00:00
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:
@@ -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()
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user