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

pjfanning (via GitHub) <[email protected]>
Newsgroups gmane.comp.jakarta.poi.devel
Message-ID <PR_kwDOAAQgj87-Sh0P-42af52f6-6d68-4636-9326-511d276043a3@gitbox.apache.org>
pjfanning commented on code in PR #92:
URL: https://github.com/apache/poi-xmlbeans/pull/92#discussion_r3771234726


##########
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:
   maybe we should catch RuntimeException or just generally not tie to one exact exception type



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