mbeckerle commented on a change in pull request #539:
URL: https://github.com/apache/daffodil/pull/539#discussion_r619564602



##########
File path: 
daffodil-runtime1/src/main/scala/org/apache/daffodil/layers/LayerTransformer.scala
##########
@@ -216,7 +216,9 @@ class JavaIOInputStream(s: InputSourceDataInputStream, 
finfo: FormatInfo)
     }
   }
 
-  override def available(): Int = 1
+  override def available(): Int = {
+    Assert.usageError("Not to be called on JavaIOInputStream.")

Review comment:
       This is causing failures of unit tests.
   I don't understand the prior definition of 1. That means there is always 
expectation that asking for 1 more byte will not hang, doesn't seem to meet the 
API definition of available(). 
   Not sure we want to be doing a blocking read here so we can return 0 if 
there is no more data, or not. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to