Clarify thrown exception when a null context is returned

This commit is contained in:
Luck
2017-02-16 21:45:43 +00:00
Unverified
parent f97aa651a0
commit b328fa74a7
@@ -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;
}
}