mbeckerle commented on code in PR #1248:
URL: https://github.com/apache/daffodil/pull/1248#discussion_r1620795360


##########
daffodil-runtime1-layers/src/main/scala/org/apache/daffodil/layers/runtime1/ByteSwapLayer.scala:
##########
@@ -137,14 +180,15 @@ class ByteSwapInputStream(wordsize: Int, jis: 
InputStream) extends InputStream {
  * order 4 3 2 1 8 7 6 5 10 9.  If wordsize were 2 then the bytes are written
  * to the wrapped output stream in the order 2 1 4 3 6 5 8 7 10 9.
  */
-class ByteSwapOutputStream(wordsize: Int, jos: OutputStream) extends 
OutputStream {
+class ByteSwapOutputStream(layer: Layer, wordsize: Int, jos: OutputStream)
+  extends OutputStream {
 
-  private val stack: Deque[Byte] = new ArrayDeque[Byte](wordsize)
+  private val stack: Deque[Byte] = new util.ArrayDeque[Byte](wordsize)
   private var closed = false
 
   override def close(): Unit = {
     if (!closed) {
-      while (!stack.isEmpty()) {
+      while (!stack.isEmpty) {

Review Comment:
   Added check and test that expects the error during unparse. 



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to