mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Clean up some areas in preparation for externalized codebase
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=221454055
This commit is contained in:
parent
c0239b0a07
commit
b317aab22f
6 changed files with 6 additions and 9 deletions
|
@ -90,7 +90,6 @@ public class DomainApplicationIndex extends BackupGroupRoot {
|
||||||
* <p>Consequently within a transaction this method will not return any applications that are not
|
* <p>Consequently within a transaction this method will not return any applications that are not
|
||||||
* yet committed to datastore, even if called on an updated DomainApplicationIndex instance
|
* yet committed to datastore, even if called on an updated DomainApplicationIndex instance
|
||||||
* storing keys to those applications.
|
* storing keys to those applications.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public static ImmutableSet<DomainApplication> loadActiveApplicationsByDomainName(
|
public static ImmutableSet<DomainApplication> loadActiveApplicationsByDomainName(
|
||||||
String fullyQualifiedDomainName, final DateTime now) {
|
String fullyQualifiedDomainName, final DateTime now) {
|
||||||
|
|
|
@ -32,6 +32,7 @@ import org.joda.time.YearMonth;
|
||||||
public final class BillingModule {
|
public final class BillingModule {
|
||||||
|
|
||||||
public static final String DETAIL_REPORT_PREFIX = "invoice_details";
|
public static final String DETAIL_REPORT_PREFIX = "invoice_details";
|
||||||
|
// TODO(b/119551360): This should be configurable, not hard-coded to Charleston Road Registry.
|
||||||
public static final String OVERALL_INVOICE_PREFIX = "CRR-INV";
|
public static final String OVERALL_INVOICE_PREFIX = "CRR-INV";
|
||||||
public static final String INVOICES_DIRECTORY = "invoices";
|
public static final String INVOICES_DIRECTORY = "invoices";
|
||||||
|
|
||||||
|
|
|
@ -455,6 +455,8 @@ public class CidrAddressBlock implements Iterable<InetAddress>, Serializable {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// InetAddresses.coerceToInteger() will be deprecated in the future.
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return InetAddresses.coerceToInteger(ip);
|
return InetAddresses.coerceToInteger(ip);
|
||||||
|
|
|
@ -21,10 +21,7 @@ import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.junit.runners.JUnit4;
|
import org.junit.runners.JUnit4;
|
||||||
|
|
||||||
/**
|
/** Tests for <a href="https://en.wikipedia.org/wiki/XML_external_entity_attack">XXE</a> attacks. */
|
||||||
* Tests for XXE attacks.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@RunWith(JUnit4.class)
|
@RunWith(JUnit4.class)
|
||||||
public class EppXxeAttackTest extends EppTestCase {
|
public class EppXxeAttackTest extends EppTestCase {
|
||||||
|
|
||||||
|
|
|
@ -109,10 +109,8 @@ public class BillingEmailUtilsTest {
|
||||||
.isEqualTo("Attached is the 2017-10 invoice for the domain registry.");
|
.isEqualTo("Attached is the 2017-10 invoice for the domain registry.");
|
||||||
assertThat(contents.getBodyPart(1)).isInstanceOf(BodyPart.class);
|
assertThat(contents.getBodyPart(1)).isInstanceOf(BodyPart.class);
|
||||||
BodyPart attachmentPart = contents.getBodyPart(1);
|
BodyPart attachmentPart = contents.getBodyPart(1);
|
||||||
// TODO(b/71631624): Fix content type in nomulus build to be "text/csv; charset=utf-8" once next
|
|
||||||
// version of framework is released.
|
|
||||||
assertThat(attachmentPart.getContentType())
|
assertThat(attachmentPart.getContentType())
|
||||||
.isEqualTo("text/plain; name=CRR-INV-2017-10.csv");
|
.isEqualTo("text/csv; charset=utf-8; name=CRR-INV-2017-10.csv");
|
||||||
assertThat(attachmentPart.getContent().toString()).isEqualTo("test,data\nhello,world");
|
assertThat(attachmentPart.getContent().toString()).isEqualTo("test,data\nhello,world");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ public final class ComparableEntityTest {
|
||||||
|
|
||||||
EntityProto proto1 = EntityTranslator.convertToPb(entity);
|
EntityProto proto1 = EntityTranslator.convertToPb(entity);
|
||||||
|
|
||||||
entity.setProperty("moe!", 400);
|
entity.setProperty("tiger!", 400);
|
||||||
EntityProto proto2 = EntityTranslator.convertToPb(entity);
|
EntityProto proto2 = EntityTranslator.convertToPb(entity);
|
||||||
|
|
||||||
// Construct entity objects from the two protos.
|
// Construct entity objects from the two protos.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue