Github user mbeckerle commented on a diff in the pull request:

    https://github.com/apache/incubator-daffodil/pull/12#discussion_r153947357
  
    --- Diff: 
daffodil-core/src/main/scala/edu/illinois/ncsa/daffodil/dsom/RuntimePropertyMixins.scala
 ---
    @@ -609,10 +631,16 @@ trait SimpleTypeRuntimeValuedPropertiesMixin
         ExpressionCompilers.String.compile(qn, NodeInfo.NonEmptyString, 
binaryFloatRepRaw)
       }.value
     
    -  final lazy val binaryFloatRepEv = {
    -    val ev = new BinaryFloatRepEv(binaryFloatRepExpr, erd)
    -    ev.compile()
    -    ev
    +  final lazy val binaryFloatRepEv = maybeBinaryFloatRepEv.get
    --- End diff --
    
    Use getOrElse here, so that code that asks for binaryFloatRepEv doesn't get 
Nope.get error if the property isn't defined.
    
    Here and for the other similar situations, as this pattern appears a fair 
bit.


---

Reply via email to