Re: [PR] report over-long float and double as invalid in val idateLexical [poi-xmlbeans]

aizu-m (via GitHub) <[email protected]>
Newsgroups gmane.comp.jakarta.poi.devel
Message-ID <PR_kwDOAAQgj87-Sh0P-f219eb06-b03a-4339-b1d4-7c3b836609bd@gitbox.apache.org>
aizu-m commented on code in PR #92:
URL: https://github.com/apache/poi-xmlbeans/pull/92#discussion_r3773827046


##########
src/main/java/org/apache/xmlbeans/impl/values/JavaDoubleHolder.java:
##########
@@ -69,7 +69,7 @@ public static double validateLexical(String v, ValidationContext context, boolea
                                          int maxNumberOfCharsForNumbers) {
         try {
             return XsTypeConverter.lexDouble(v, strict, maxNumberOfCharsForNumbers);
-        } catch (NumberFormatException e) {
+        } catch (IllegalArgumentException e) {

Review Comment:
   Done, widened both holders to catch RuntimeException. Regression test still passes: the over-long value comes back as an XmlError and normal values validate as before.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.