Skip to content
Snippets Groups Projects
Commit 7b3e4171 authored by Christian Wulf's avatar Christian Wulf
Browse files

SingleElementPipe.add throw an exception upon adding null

parent 14a47e8b
No related branches found
No related tags found
No related merge requests found
......@@ -35,12 +35,12 @@ final class SingleElementPipe extends AbstractIntraThreadPipe {
@Override
public boolean add(final Object element) {
if (null != element) {
this.element = element;
this.reportNewElement();
return true;
if (null == element) {
throw new IllegalArgumentException("Parameter 'element' is null, but must be non-null.");
}
return false;
this.element = element;
this.reportNewElement();
return true;
}
@Override
......
wiki @ 0e447457
Subproject commit b20be6858bdfa41c8a928c157064c4efa0614069
Subproject commit 0e4474577e1f49bc96e734c286b2d9e0363895e8
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment