mirror of
https://github.com/google/nomulus
synced 2026-04-24 02:00:50 +00:00
Fix access to a nullable field in HistoryEntry (#1193)
* Fix access to a nullable field in HistoryEntry
This commit is contained in:
@@ -61,6 +61,7 @@ import javax.persistence.EnumType;
|
||||
import javax.persistence.Enumerated;
|
||||
import javax.persistence.MappedSuperclass;
|
||||
import javax.persistence.Transient;
|
||||
import org.apache.commons.lang3.BooleanUtils;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
/**
|
||||
@@ -435,7 +436,8 @@ public class HistoryEntry extends ImmutableObject implements Buildable, Datastor
|
||||
checkArgumentNotNull(getInstance().modificationTime, "Modification time must be specified");
|
||||
checkArgumentNotNull(getInstance().clientId, "Registrar ID must be specified");
|
||||
checkArgument(
|
||||
!getInstance().type.equals(Type.SYNTHETIC) || !getInstance().requestedByRegistrar,
|
||||
!getInstance().type.equals(Type.SYNTHETIC)
|
||||
|| BooleanUtils.isNotTrue(getInstance().requestedByRegistrar),
|
||||
"Synthetic history entries cannot be requested by a registrar");
|
||||
return super.build();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user