stevedlawrence commented on a change in pull request #374:
URL: https://github.com/apache/incubator-daffodil/pull/374#discussion_r417285727



##########
File path: 
daffodil-runtime1/src/main/scala/org/apache/daffodil/dpath/NodeInfo.scala
##########
@@ -410,15 +410,15 @@ object NodeInfo extends Enum {
     Byte,
     Short,
     Long,
-    Integer,
-    Decimal,
     UnsignedInt,
     UnsignedByte,
     UnsignedShort,
     UnsignedLong,
     NonNegativeInteger,
+    Integer,
     Double,
     Float,
+    Decimal,
     HexBinary,

Review comment:
       So the order of this list is important? I think it would be helpful in 
the commit message what the problem was so looking back on this we have a 
better idea of why this change was made. Might also be useful to add a comment 
to explain why order is important.
   
   I'd guess this is because PrimType.fromNodeInfo searches allPrimTypes 
looking for the first subTypeOf, and I guess some NodeInfo's are subtypes of 
multiple PrimTypes? So these need to be ordred from most specific to least 
specific, or somethign like that?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to