add check to SimpleConfigList that resolveStatus is correct

This commit is contained in:
Havoc Pennington 2012-02-24 23:49:43 -05:00
parent 7844f13dfa
commit fb17706961

View File

@ -34,6 +34,11 @@ final class SimpleConfigList extends AbstractConfigValue implements ConfigList {
super(origin);
this.value = value;
this.resolved = status == ResolveStatus.RESOLVED;
// kind of an expensive debug check (makes this constructor pointless)
if (status != ResolveStatus.fromValues(value))
throw new ConfigException.BugOrBroken(
"SimpleConfigList created with wrong resolve status: " + this);
}
@Override