mirror of
https://github.com/google/nomulus.git
synced 2025-07-22 18:55:58 +02:00
Fix build warnings (#2274)
All of these were causing warnings to appear during a build of the codebase.
This commit is contained in:
parent
cfdf12aa7d
commit
e56e751652
5 changed files with 6 additions and 8 deletions
|
@ -153,7 +153,7 @@ public class BsaRefreshAction implements Runnable {
|
|||
Optional<String> report =
|
||||
JsonSerializations.toUnblockableDomainsReport(
|
||||
changes
|
||||
.filter(UnblockableDomainChange::AddOrChange)
|
||||
.filter(UnblockableDomainChange::isAddOrChange)
|
||||
.map(UnblockableDomainChange::newValue));
|
||||
if (report.isPresent()) {
|
||||
gcsClient.logRemovedUnblockableDomainsReport(
|
||||
|
|
|
@ -52,12 +52,12 @@ public abstract class UnblockableDomainChange {
|
|||
return UnblockableDomain.of(unblockable().domainName(), newReason().get());
|
||||
}
|
||||
|
||||
public boolean AddOrChange() {
|
||||
public boolean isAddOrChange() {
|
||||
return newReason().isPresent();
|
||||
}
|
||||
|
||||
public boolean isDelete() {
|
||||
return !this.AddOrChange();
|
||||
return !this.isAddOrChange();
|
||||
}
|
||||
|
||||
public boolean isNew() {
|
||||
|
|
|
@ -264,8 +264,6 @@ public class DomainFlowUtils {
|
|||
/**
|
||||
* Verifies that the {@code domainLabel} is not blocked by any BSA block label for the given
|
||||
* {@code tld} at the specified time.
|
||||
*
|
||||
* @throws DomainLabelBlockedByBsaException
|
||||
*/
|
||||
public static void verifyNotBlockedByBsa(String domainLabel, Tld tld, DateTime now)
|
||||
throws DomainLabelBlockedByBsaException {
|
||||
|
|
|
@ -68,7 +68,7 @@ public final class UrlConnectionUtils {
|
|||
/** Checks whether {@code bytes} are GZIP encoded. */
|
||||
public static boolean isGZipped(byte[] bytes) {
|
||||
// See GzipOutputStream.writeHeader()
|
||||
return (bytes.length > 2 && bytes[0] == (byte) (GZIPInputStream.GZIP_MAGIC))
|
||||
return (bytes.length > 2 && bytes[0] == (byte) GZIPInputStream.GZIP_MAGIC)
|
||||
&& (bytes[1] == (byte) (GZIPInputStream.GZIP_MAGIC >> 8));
|
||||
}
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ class TldsTest {
|
|||
Tld.get("foo")
|
||||
.asBuilder()
|
||||
.setTldType(TldType.TEST)
|
||||
.setBsaEnrollStartTime(Optional.of(fakeClock.nowUtc().minus(1)))
|
||||
.setBsaEnrollStartTime(Optional.of(fakeClock.nowUtc().minusMillis(1)))
|
||||
.build());
|
||||
assertThat(hasActiveBsaEnrollment(fakeClock.nowUtc())).isFalse();
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ class TldsTest {
|
|||
persistResource(
|
||||
Tld.get("foo")
|
||||
.asBuilder()
|
||||
.setBsaEnrollStartTime(Optional.of(fakeClock.nowUtc().minus(1)))
|
||||
.setBsaEnrollStartTime(Optional.of(fakeClock.nowUtc().minusMillis(1)))
|
||||
.build());
|
||||
assertThat(hasActiveBsaEnrollment(fakeClock.nowUtc())).isTrue();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue