Clarify thrown exception when a null context is returned

This commit is contained in:
Luck 2017-02-16 21:45:43 +00:00
parent f97aa651a0
commit b328fa74a7
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -52,6 +52,7 @@ public class ExtractedContexts {
}
private ExtractedContexts(ContextSet contexts) {
this.contexts = null;
setup(contexts);
}
@ -64,4 +65,11 @@ public class ExtractedContexts {
this.contextSet = contextSet.makeImmutable();
}
public Contexts getContexts() {
if (contexts == null) {
throw new NullPointerException("contexts");
}
return contexts;
}
}