Repository: storm Updated Branches: refs/heads/1.x-branch cb2d7e8be -> d029e1c04
[STORM-2769] Fast-fail if output streamId is null Project: http://git-wip-us.apache.org/repos/asf/storm/repo Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/d029e1c0 Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/d029e1c0 Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/d029e1c0 Branch: refs/heads/1.x-branch Commit: d029e1c044ce81273c2711f295c811f680f23385 Parents: cb2d7e8 Author: Ethan Li <[email protected]> Authored: Tue Oct 3 13:54:18 2017 -0500 Committer: Stig Rohde Døssing <[email protected]> Committed: Wed Oct 4 21:26:57 2017 +0200 ---------------------------------------------------------------------- .../src/jvm/org/apache/storm/topology/OutputFieldsGetter.java | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/storm/blob/d029e1c0/storm-core/src/jvm/org/apache/storm/topology/OutputFieldsGetter.java ---------------------------------------------------------------------- diff --git a/storm-core/src/jvm/org/apache/storm/topology/OutputFieldsGetter.java b/storm-core/src/jvm/org/apache/storm/topology/OutputFieldsGetter.java index abc939c..fa4ca84 100644 --- a/storm-core/src/jvm/org/apache/storm/topology/OutputFieldsGetter.java +++ b/storm-core/src/jvm/org/apache/storm/topology/OutputFieldsGetter.java @@ -39,6 +39,9 @@ public class OutputFieldsGetter implements OutputFieldsDeclarer { } public void declareStream(String streamId, boolean direct, Fields fields) { + if (null == streamId) { + throw new IllegalArgumentException("streamId can't be null"); + } if(_fields.containsKey(streamId)) { throw new IllegalArgumentException("Fields for " + streamId + " already set"); }
