Repository: incubator-nifi
Updated Branches:
  refs/heads/develop a49a03da4 -> 8d745c2b7


NIFI-546 clarified javadoc and added null check


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/8d745c2b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/8d745c2b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/8d745c2b

Branch: refs/heads/develop
Commit: 8d745c2b7699ab9fc66b8d816a6b9be5caf2efa1
Parents: a49a03d
Author: joewitt <[email protected]>
Authored: Fri Jun 5 10:36:51 2015 -0400
Committer: joewitt <[email protected]>
Committed: Fri Jun 5 10:36:51 2015 -0400

----------------------------------------------------------------------
 .../nifi/cluster/protocol/StandardDataFlow.java | 27 ++++++++------------
 1 file changed, 10 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/8d745c2b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/StandardDataFlow.java
----------------------------------------------------------------------
diff --git 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/StandardDataFlow.java
 
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/StandardDataFlow.java
index 0f0ed69..3b6d110 100644
--- 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/StandardDataFlow.java
+++ 
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/main/java/org/apache/nifi/cluster/protocol/StandardDataFlow.java
@@ -16,7 +16,6 @@
  */
 package org.apache.nifi.cluster.protocol;
 
-import org.apache.nifi.cluster.protocol.DataFlow;
 import java.io.Serializable;
 import java.util.Arrays;
 
@@ -41,12 +40,15 @@ public class StandardDataFlow implements Serializable, 
DataFlow {
      * Constructs an instance.
      *
      * @param flow a valid flow as bytes, which cannot be null
-     * @param templateBytes an XML representation of templates
-     * @param snippetBytes an XML representation of snippets
+     * @param templateBytes an XML representation of templates.  May be null.
+     * @param snippetBytes an XML representation of snippets.  May be null.
      *
-     * @throws NullPointerException if any argument is null
+     * @throws NullPointerException if flow is null
      */
     public StandardDataFlow(final byte[] flow, final byte[] templateBytes, 
final byte[] snippetBytes) {
+        if(flow == null){
+            throw new NullPointerException("Flow cannot be null");
+        }
         this.flow = flow;
         this.templateBytes = templateBytes;
         this.snippetBytes = snippetBytes;
@@ -63,31 +65,22 @@ public class StandardDataFlow implements Serializable, 
DataFlow {
         return bytes == null ? null : Arrays.copyOf(bytes, bytes.length);
     }
 
-    /**
-     * @return the raw byte array of the flow
-     */
+    @Override
     public byte[] getFlow() {
         return flow;
     }
 
-    /**
-     * @return the raw byte array of the templates
-     */
+    @Override
     public byte[] getTemplates() {
         return templateBytes;
     }
 
-    /**
-     * @return the raw byte array of the snippets
-     */
+    @Override
     public byte[] getSnippets() {
         return snippetBytes;
     }
 
-    /**
-     * @return true if processors should be automatically started at 
application
-     * startup; false otherwise
-     */
+    @Override
     public boolean isAutoStartProcessors() {
         return autoStartProcessors;
     }

Reply via email to