mbeckerle commented on a change in pull request #161: Make the JAPI/SAPI 
DataProcessors serializable
URL: https://github.com/apache/incubator-daffodil/pull/161#discussion_r245394755
 
 

 ##########
 File path: 
daffodil-japi/src/test/java/org/apache/daffodil/example/TestJavaAPI.java
 ##########
 @@ -59,8 +61,34 @@
         }
     }
 
+    public DataProcessor reserializeDataProcessor(DataProcessor dp) throws 
IOException, ClassNotFoundException {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ObjectOutputStream oos = new ObjectOutputStream(baos);
+        oos.writeObject(dp);
+        oos.close();
+
+        ByteArrayInputStream bais = new 
ByteArrayInputStream(baos.toByteArray());
+        ObjectInputStream ois = new ObjectInputStream(bais) {
+            /**
 
 Review comment:
   Can this explanation then go into the code. These reviews aren't a great 
place to capture things like this. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to