mbeckerle commented on a change in pull request #358: Require grouping and 
decimal separators for non-integer types
URL: https://github.com/apache/incubator-daffodil/pull/358#discussion_r405775138
 
 

 ##########
 File path: 
daffodil-core/src/main/scala/org/apache/daffodil/grammar/primitives/PrimitivesTextNumber.scala
 ##########
 @@ -109,15 +109,23 @@ case class ConvertTextNumberPrim(e: ElementBase)
       case _ => (Nope, Nope)
     }
 
+    val isInt = e.primType match {
+      case PrimType.Double | PrimType.Float | PrimType.Decimal => false
+      case _ => true
+    }
+
     // If the pattern contains any of these characters, we need to set both
     // group and decimal separators, even if the pattern doesn't contain the
     // associated character. This is because even when the pattern does not
     // contain the grouping/decimal separators, ICU stills seems to take the
     // separators into account. And since ICU provides defaut values based on
-    // locales, not setting them can cause subtle locale related bugs.
+    // locales, not setting them can cause subtle locale related bugs. We must
+    // also required the separators if the prim type is not an integer type,
 
 Review comment:
   typo "required" should be "require"

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


With regards,
Apache Git Services

Reply via email to