mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Add missing @Nullable annotations to ForeignKeyIndex load methods
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=138782186
This commit is contained in:
parent
780a5add78
commit
07a6e55f82
1 changed files with 3 additions and 0 deletions
|
@ -33,6 +33,7 @@ import google.registry.model.contact.ContactResource;
|
|||
import google.registry.model.domain.DomainResource;
|
||||
import google.registry.model.host.HostResource;
|
||||
import java.util.Map;
|
||||
import javax.annotation.Nullable;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
/**
|
||||
|
@ -128,6 +129,7 @@ public abstract class ForeignKeyIndex<E extends EppResource> extends BackupGroup
|
|||
* @param now the current logical time to use when checking for soft deletion of the foreign key
|
||||
* index
|
||||
*/
|
||||
@Nullable
|
||||
public static <E extends EppResource> Key<E> loadAndGetKey(
|
||||
Class<E> clazz, String foreignKey, DateTime now) {
|
||||
ForeignKeyIndex<E> index = load(clazz, foreignKey, now);
|
||||
|
@ -140,6 +142,7 @@ public abstract class ForeignKeyIndex<E extends EppResource> extends BackupGroup
|
|||
*
|
||||
* <p>This will return null if the {@link ForeignKeyIndex} doesn't exist or has been soft deleted.
|
||||
*/
|
||||
@Nullable
|
||||
public static <E extends EppResource> ForeignKeyIndex<E> load(
|
||||
Class<E> clazz, String foreignKey, DateTime now) {
|
||||
return load(clazz, ImmutableList.of(foreignKey), now).get(foreignKey);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue