You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Mike Beckerle (Jira)" <ji...@apache.org> on 2022/01/24 16:11:00 UTC

[jira] [Commented] (DAFFODIL-2632) NumberFormatException for blank dfdlx:repValues

    [ https://issues.apache.org/jira/browse/DAFFODIL-2632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17481219#comment-17481219 ] 

Mike Beckerle commented on DAFFODIL-2632:
-----------------------------------------

So this short-form property is not getting validated, because the XSD for this attribute should not allow empty string. 

Pretty sure we added short-form validation a while back, so I'm not sure why this isn't getting caught. Perhaps there is no constraint on it requiring it to be non-empty. 

> NumberFormatException for blank dfdlx:repValues
> -----------------------------------------------
>
>                 Key: DAFFODIL-2632
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2632
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Back End
>    Affects Versions: 3.2.1
>            Reporter: Josh Adams
>            Priority: Major
>
> As the title suggests, if a user forgets to add a value to a dfdlx:repValue, ie:
> <enumeration value="ENUM_VALUE" dfdlx:repValues=""/>
> It results in the following exception when the schema is compiled:
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> !! An unexpected exception occurred. This is a bug! !!
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> Please report this bug and help us fix it:
> https://daffodil.apache.org/community/#issue-tracker
> Please include the following exception, the command you
> ran, and any input, schema, or tdml files used that led
> to this bug.
> java.lang.NumberFormatException: Zero length BigInteger
> at java.base/java.math.BigInteger.<init>(BigInteger.java:484)
> at java.base/java.math.BigInteger.<init>(BigInteger.java:672)
> at org.apache.daffodil.dsom.HasRepValueAttributes.$anonfun$x$4$6(SimpleTypes.scala:90)
> at org.apache.daffodil.dsom.HasRepValueAttributes.$anonfun$x$4$6$adapted(SimpleTypes.scala:90)
> at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:286)
> at scala.collection.IndexedSeqOptimized.foreach(IndexedSeqOptimized.scala:36)
> at scala.collection.IndexedSeqOptimized.foreach$(IndexedSeqOptimized.scala:33)
> at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:38)
> at scala.collection.TraversableLike.map(TraversableLike.scala:286)
> at scala.collection.TraversableLike.map$(TraversableLike.scala:279)
> ......
> For reference, the enumeration was based on an xs:integer, but the same behavior occurred when using an xs:long as well.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)