[
https://issues.apache.org/jira/browse/DAFFODIL-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mike Beckerle resolved DAFFODIL-2657.
-------------------------------------
Fix Version/s: 3.3.0
Resolution: Fixed
fixed in 575a4c6ff9fcadb8eff733ba693b831de4156201
> prefixedLengthType which itself has lengthKind 'implict' fails with None.get
> ----------------------------------------------------------------------------
>
> Key: DAFFODIL-2657
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2657
> Project: Daffodil
> Issue Type: Bug
> Components: Middle "End"
> Affects Versions: 3.2.1
> Reporter: Mike Beckerle
> Assignee: Mike Beckerle
> Priority: Major
> Fix For: 3.3.0
>
>
> When an element has prefixed lengthKind, prefixIncludesPrefixLength='yes' the
> prefixLengthKind itself is derived from xs:unsignedInt and has implicit
> lengthKind (hence, length 4 bytes) and representation is 'binary'.
> This should work to subtract 4 bytes from the value of the prefix to get the
> value of the length of the content.
> However, I get this backtrace:
> {code:java}
> java.util.NoSuchElementException: None.get at
> scala.None$.get(Option.scala:529)
> at scala.None$.get(Option.scala:527)
> at
> org.apache.daffodil.grammar.ElementBaseGrammarMixin.prefixedLengthAdjustmentInUnits(ElementBaseGrammarMixin.scala:201)
> at
> org.apache.daffodil.grammar.ElementBaseGrammarMixin.prefixedLengthAdjustmentInUnits$(ElementBaseGrammarMixin.scala:193)
> at
> org.apache.daffodil.dsom.AbstractElementRef.prefixedLengthAdjustmentInUnits$lzycompute(ElementRef.scala:38)
> at
> org.apache.daffodil.dsom.AbstractElementRef.prefixedLengthAdjustmentInUnits(ElementRef.scala:38)
> at
> org.apache.daffodil.grammar.primitives.SpecifiedLengthPrefixed.pladj$lzycompute(SpecifiedLength.scala:156)
> at
> org.apache.daffodil.grammar.primitives.SpecifiedLengthPrefixed.pladj(SpecifiedLength.scala:156)
> {code}
> It seems to be because Daffodil is assuming there will be a lengthEv for the
> length of the prefix, but if the prefixLengthType itself uses lengthKind
> 'implicit' there will not be a lengthEv (currently).
--
This message was sent by Atlassian Jira
(v8.20.1#820001)