Clarify thrown exception when a null context is returned
This commit is contained in:
parent
f97aa651a0
commit
b328fa74a7
@ -52,6 +52,7 @@ public class ExtractedContexts {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private ExtractedContexts(ContextSet contexts) {
|
private ExtractedContexts(ContextSet contexts) {
|
||||||
|
this.contexts = null;
|
||||||
setup(contexts);
|
setup(contexts);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,4 +65,11 @@ public class ExtractedContexts {
|
|||||||
|
|
||||||
this.contextSet = contextSet.makeImmutable();
|
this.contextSet = contextSet.makeImmutable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Contexts getContexts() {
|
||||||
|
if (contexts == null) {
|
||||||
|
throw new NullPointerException("contexts");
|
||||||
|
}
|
||||||
|
return contexts;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user