@@ -27,8 +27,8 @@ class ModelPropertyParser(cls: Class[_], t: Map[String, String] = Map.empty) (im
2727 }
2828 val processedFields = new ListBuffer [String ]
2929 val excludedFieldTypes = new HashSet [String ]
30- final val positiveInfinity = " Infinity "
31- final val negativeInfinity = " -Infinity "
30+ final val positiveInfinity = " infinity "
31+ final val negativeInfinity = " -infinity "
3232
3333 def parse = Option (cls).map(parseRecursive(_))
3434
@@ -378,13 +378,13 @@ class ModelPropertyParser(cls: Class[_], t: Map[String, String] = Map.empty) (im
378378 }
379379 else {
380380 val min = ranges(0 ) match {
381- case e : String if (e == positiveInfinity) => Float .PositiveInfinity
382- case e : String if (e == negativeInfinity) => Float .NegativeInfinity
381+ case e : String if (e.toLowerCase() == positiveInfinity) => Float .PositiveInfinity
382+ case e : String if (e.toLowerCase() == negativeInfinity) => Float .NegativeInfinity
383383 case e : String => e.toFloat
384384 }
385385 val max = ranges(1 ) match {
386- case e : String if (e == positiveInfinity) => Float .PositiveInfinity
387- case e : String if (e == negativeInfinity) => Float .NegativeInfinity
386+ case e : String if (e.toLowerCase() == positiveInfinity) => Float .PositiveInfinity
387+ case e : String if (e.toLowerCase() == negativeInfinity) => Float .NegativeInfinity
388388 case e : String => e.toFloat
389389 }
390390 AllowableRangeValues (min.toString, max.toString)
0 commit comments