jadams-tresys commented on a change in pull request #450:
URL: https://github.com/apache/incubator-daffodil/pull/450#discussion_r539559383
##########
File path:
daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/VariableMap1.scala
##########
@@ -188,24 +283,42 @@ class VariableMap private(vTable: Map[GlobalQName,
MStackOf[VariableInstance]])
* VariableInstances are mutable and cannot safely be shared across threads
*/
def copy(): VariableMap = {
- val table = Map[GlobalQName, MStackOf[VariableInstance]]()
- vTable.foreach { case (k: GlobalQName, s: MStackOf[VariableInstance]) => {
- val newStack= new MStackOf[VariableInstance]()
+ val table = Map[GlobalQName, ArrayBuffer[VariableInstance]]()
+ vTable.foreach { case (k: GlobalQName, abuf:
ArrayBuffer[VariableInstance]) => {
+ val newBuf = new ArrayBuffer[VariableInstance]()
// toList provides a list in LIFO order, so we need to reverse it to
// maintain order
- s.toList.reverse.foreach { case v: VariableInstance =>
newStack.push(v.copy()) }
- table(k) = newStack
+ abuf.foreach { case v: VariableInstance => { newBuf += v.copy() }}
Review comment:
I must have missed this one. I wonder what the logic github has for
deciding what things should be hidden
----------------------------------------------------------------
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]