SAMZA-1075: fix partitionCount assertion from PR53
authorJacob Maes <jmakes@apache.org>
Wed, 22 Feb 2017 00:49:37 +0000 (16:49 -0800)
committerJacob Maes <jmaes@linkedin.com>
Wed, 22 Feb 2017 00:49:37 +0000 (16:49 -0800)
nickpan47 here's the fix for the issue you found in PR53

Author: Jacob Maes <jmaes@linkedin.com>

Reviewers: Yi Pan <nickpan47@gmail.com>

Closes #57 from jmakes/samza-1075-2

samza-api/src/main/java/org/apache/samza/system/StreamSpec.java

index d8a2144..e953d46 100644 (file)
@@ -146,7 +146,7 @@ public class StreamSpec {
     }
 
     if (partitionCount < 1) {
-      throw new NullPointerException("Parameter 'partitionCount' must not be greater than 0");
+      throw new IllegalArgumentException("Parameter 'partitionCount' must be greater than 0");
     }
 
     this.id = id;