Michael Beckerle created DAFFODIL-1988:
------------------------------------------

             Summary: textOutputMinLength - incorrect code found by inspection
                 Key: DAFFODIL-1988
                 URL: https://issues.apache.org/jira/browse/DAFFODIL-1988
             Project: Daffodil
          Issue Type: Bug
          Components: Middle "End"
    Affects Versions: 2.1.0
            Reporter: Michael Beckerle
             Fix For: 2.2.0


This logic
{{
    val isTypeUsingTextOutputMinLength = typeDef.typeNode match {
      case s: NodeInfo.String.Kind => false
      case s: NodeInfo.HexBinary.Kind => false
      case s: NodeInfo.AnySimpleType.Kind if (impliedRepresentation eq 
Representation.Binary) &&
        this.textOutputMinLength > 0 => true
      case _ => false
    }
}}

The sense of the "if (impliedRepresentation eq Representation.Binary) is 
backward. It should be asking if it is Representation.Text.

This is used to issue an SDE about explicit length being out of range for 
textOutputMinLength, but will clearly not do so in the right way.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to