mirror of
https://github.com/google/nomulus.git
synced 2025-07-22 10:46:10 +02:00
Fix access to a nullable field in HistoryEntry (#1193)
* Fix access to a nullable field in HistoryEntry
This commit is contained in:
parent
5f479488fa
commit
16392c3808
1 changed files with 3 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue