mirror of
https://github.com/google/nomulus.git
synced 2025-07-23 11:16:04 +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 =
|
Optional<String> report =
|
||||||
JsonSerializations.toUnblockableDomainsReport(
|
JsonSerializations.toUnblockableDomainsReport(
|
||||||
changes
|
changes
|
||||||
.filter(UnblockableDomainChange::AddOrChange)
|
.filter(UnblockableDomainChange::isAddOrChange)
|
||||||
.map(UnblockableDomainChange::newValue));
|
.map(UnblockableDomainChange::newValue));
|
||||||
if (report.isPresent()) {
|
if (report.isPresent()) {
|
||||||
gcsClient.logRemovedUnblockableDomainsReport(
|
gcsClient.logRemovedUnblockableDomainsReport(
|
||||||
|
|
|
@ -52,12 +52,12 @@ public abstract class UnblockableDomainChange {
|
||||||
return UnblockableDomain.of(unblockable().domainName(), newReason().get());
|
return UnblockableDomain.of(unblockable().domainName(), newReason().get());
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean AddOrChange() {
|
public boolean isAddOrChange() {
|
||||||
return newReason().isPresent();
|
return newReason().isPresent();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isDelete() {
|
public boolean isDelete() {
|
||||||
return !this.AddOrChange();
|
return !this.isAddOrChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isNew() {
|
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
|
* Verifies that the {@code domainLabel} is not blocked by any BSA block label for the given
|
||||||
* {@code tld} at the specified time.
|
* {@code tld} at the specified time.
|
||||||
*
|
|
||||||
* @throws DomainLabelBlockedByBsaException
|
|
||||||
*/
|
*/
|
||||||
public static void verifyNotBlockedByBsa(String domainLabel, Tld tld, DateTime now)
|
public static void verifyNotBlockedByBsa(String domainLabel, Tld tld, DateTime now)
|
||||||
throws DomainLabelBlockedByBsaException {
|
throws DomainLabelBlockedByBsaException {
|
||||||
|
|
|
@ -68,7 +68,7 @@ public final class UrlConnectionUtils {
|
||||||
/** Checks whether {@code bytes} are GZIP encoded. */
|
/** Checks whether {@code bytes} are GZIP encoded. */
|
||||||
public static boolean isGZipped(byte[] bytes) {
|
public static boolean isGZipped(byte[] bytes) {
|
||||||
// See GzipOutputStream.writeHeader()
|
// 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));
|
&& (bytes[1] == (byte) (GZIPInputStream.GZIP_MAGIC >> 8));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,7 @@ class TldsTest {
|
||||||
Tld.get("foo")
|
Tld.get("foo")
|
||||||
.asBuilder()
|
.asBuilder()
|
||||||
.setTldType(TldType.TEST)
|
.setTldType(TldType.TEST)
|
||||||
.setBsaEnrollStartTime(Optional.of(fakeClock.nowUtc().minus(1)))
|
.setBsaEnrollStartTime(Optional.of(fakeClock.nowUtc().minusMillis(1)))
|
||||||
.build());
|
.build());
|
||||||
assertThat(hasActiveBsaEnrollment(fakeClock.nowUtc())).isFalse();
|
assertThat(hasActiveBsaEnrollment(fakeClock.nowUtc())).isFalse();
|
||||||
}
|
}
|
||||||
|
@ -131,7 +131,7 @@ class TldsTest {
|
||||||
persistResource(
|
persistResource(
|
||||||
Tld.get("foo")
|
Tld.get("foo")
|
||||||
.asBuilder()
|
.asBuilder()
|
||||||
.setBsaEnrollStartTime(Optional.of(fakeClock.nowUtc().minus(1)))
|
.setBsaEnrollStartTime(Optional.of(fakeClock.nowUtc().minusMillis(1)))
|
||||||
.build());
|
.build());
|
||||||
assertThat(hasActiveBsaEnrollment(fakeClock.nowUtc())).isTrue();
|
assertThat(hasActiveBsaEnrollment(fakeClock.nowUtc())).isTrue();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue