You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- make childParsers an array instead of a vector. We do this because Vectors (and other scala collections) have an issue where failure to deserialize leads to very unhelpful error messages, possible a bug in Java deserialization logic. And when using things like charsets/udfs/layers, it's very easy to mess up classpaths and hit this bug, so it's important to have good diagnostics. The solution is to avoid scala collections for things that might fail deserialization. We could switch to a Java Vector, but we don't really need the functionality the Vector provides. The uses of these Vectors just need fast length and indexing, which Array provides.
- make childProcessors a def instead of a lazy val. Changing childProcessors causes it to not be serialized at all so the fact that it's a Vector doesn't matter. Using a def could cause it to be calculated multiple times, but childProcessors is only accessed once per Processor during compilation, so this isn't an issue. In fact, it probably wants to be a def since childProcessors is something we'll never use again so it just wastes memory as a val
- change runtimeDependencies to def for the same reason as childProcessors
DAFFODIL-2152
Copy file name to clipboardExpand all lines: daffodil-runtime1-unparser/src/main/scala/org/apache/daffodil/unparsers/runtime1/BinaryBooleanUnparsers.scala
Copy file name to clipboardExpand all lines: daffodil-runtime1-unparser/src/main/scala/org/apache/daffodil/unparsers/runtime1/BinaryNumberUnparsers.scala
+8-8
Original file line number
Diff line number
Diff line change
@@ -111,7 +111,7 @@ class BinaryIntegerKnownLengthUnparser(
111
111
) extendsBinaryIntegerBaseUnparser(e)
112
112
withHasKnownLengthInBits {
113
113
114
-
overridelazyvalruntimeDependencies=Vector()
114
+
overridedefruntimeDependencies=Vector()
115
115
116
116
}
117
117
@@ -122,7 +122,7 @@ class BinaryIntegerRuntimeLengthUnparser(
122
122
) extendsBinaryIntegerBaseUnparser(e)
123
123
withHasRuntimeExplicitLength {
124
124
125
-
overridevalruntimeDependencies=Vector(lengthEv)
125
+
overridedefruntimeDependencies=Vector(lengthEv)
126
126
}
127
127
128
128
classBinaryIntegerMinimumLengthUnparser(
@@ -132,7 +132,7 @@ class BinaryIntegerMinimumLengthUnparser(
Copy file name to clipboardExpand all lines: daffodil-runtime1-unparser/src/main/scala/org/apache/daffodil/unparsers/runtime1/ChoiceAndOtherVariousUnparsers.scala
Copy file name to clipboardExpand all lines: daffodil-runtime1-unparser/src/main/scala/org/apache/daffodil/unparsers/runtime1/ConvertBinaryCalendarUnparser.scala
+1-1
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ case class ConvertBinaryCalendarSecMilliUnparser(
40
40
/**
41
41
* Primitive unparsers must override runtimeDependencies
Copy file name to clipboardExpand all lines: daffodil-runtime1-unparser/src/main/scala/org/apache/daffodil/unparsers/runtime1/ConvertNonBaseTenTextNumberUnparser.scala
+1-1
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ case class ConvertNonBaseTenTextNumberUnparser(
Copy file name to clipboardExpand all lines: daffodil-runtime1-unparser/src/main/scala/org/apache/daffodil/unparsers/runtime1/ConvertTextBooleanUnparser.scala
+1-1
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ case class ConvertTextBooleanUnparser(
34
34
/**
35
35
* Primitive unparsers must override runtimeDependencies
Copy file name to clipboardExpand all lines: daffodil-runtime1-unparser/src/main/scala/org/apache/daffodil/unparsers/runtime1/ConvertTextCalendarUnparser.scala
+1-1
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ case class ConvertTextCalendarUnparser(
37
37
/**
38
38
* Primitive unparsers must override runtimeDependencies
Copy file name to clipboardExpand all lines: daffodil-runtime1-unparser/src/main/scala/org/apache/daffodil/unparsers/runtime1/ConvertTextStandardNumberUnparser.scala
+3-3
Original file line number
Diff line number
Diff line change
@@ -35,9 +35,9 @@ case class ConvertTextCombinatorUnparser(
Copy file name to clipboardExpand all lines: daffodil-runtime1-unparser/src/main/scala/org/apache/daffodil/unparsers/runtime1/ConvertZonedNumberUnparser.scala
+3-3
Original file line number
Diff line number
Diff line change
@@ -30,9 +30,9 @@ case class ConvertZonedCombinatorUnparser(
0 commit comments