google-nomulus/javatests/google/registry/model
nickfelt d1ea3e3a68 Fix NPE bug in DomainCommand.cloneAndLinkReferences()
See b/30806813 for more context.  Copied from there:  This appears to be happening if we get an EPP domain create command that is missing any contacts (but has a registrant; with no registrant we exercise a different codepath).  In that case, JAXB leaves the contacts field on the Create null, and we try to pass it into Sets.union() as a result of Corey's refactoring in [] that changed contact loading to load the contacts and registrant all at once.  The fix is just to apply nullToEmpty() first.

Note that it's always an error to try to create a domain without any non-registrant contacts, but that's supposed to happen later on in BaseDomainCreateFlow.verifyCreateIsAllowed() via validateRequiredContactsPresent(), which will produce a nice error message.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130309019
2016-08-15 17:13:29 -04:00
..
billing Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
common Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
contact RDAP: Implement entity name search 2016-08-15 17:13:29 -04:00
domain Fix NPE bug in DomainCommand.cloneAndLinkReferences() 2016-08-15 17:13:29 -04:00
eppoutput Rename Java packages to use the .google TLD 2016-05-13 20:04:42 -04:00
export Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
host Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
index Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
mark Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
ofy Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
poll Handle nullness properly in some message/flow/poll code 2016-07-15 14:58:57 -04:00
rde Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
registrar Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
registry Allow two-letter domain names 2016-08-15 16:57:19 -04:00
reporting Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
server Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
smd Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
tmch Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
transfer Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
translators Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
BUILD Handle nullness properly in some message/flow/poll code 2016-07-15 14:58:57 -04:00
CreateAutoTimestampTest.java Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
EntityClassesTest.java Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
EntityTestCase.java Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
EppResourceUtilsTest.java Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
ImmutableObjectTest.java Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
ModelUtilsTest.java Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
ResourceCommandTestCase.java Rename Java packages to use the .google TLD 2016-05-13 20:04:42 -04:00
RoidSuffixesTest.java Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
schema.txt RDAP: Implement entity name search 2016-08-15 17:13:29 -04:00
SchemaVersionTest.java Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00
UpdateAutoTimestampTest.java Convert entire project to strict lexicographical import sort ordering 2016-07-13 15:59:53 -04:00