mbeckerle commented on code in PR #917:
URL: https://github.com/apache/daffodil/pull/917#discussion_r1081738003
##########
daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/TypeCalculator.scala:
##########
@@ -176,17 +176,17 @@ class KeysetValueTypeCalculatorUnordered(valueMap:
HashMap[DataValuePrimitive, D
if (valueMap.contains(x)) {
valueMap.get(x) match {
case Some(a) => (a, Maybe.Nope)
- case None => (DataValue.NoValue, One(s"Value ${x} not found in
keyset-value mapping"))
+ case None => (DataValue.NoValue, One(s"Value ${x} not found in
enumeration dfdlx:repValues"))
Review Comment:
This is unreachable. If valueMap.contains(x), then valueMap.get(x) will not
return None.
You don't need both an if and a match case here. You valueMap.get(x)
returns an Option, so you can just do the match-case.
--
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]