Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit size of exception message in BigDecimalParser #744

Merged

Conversation

pjfanning
Copy link
Member

new limit may even be too large

@pjfanning pjfanning changed the base branch from 2.14 to 2.13 March 31, 2022 18:24
@pjfanning pjfanning changed the title Limit size of exception message in BigDececimalParser Limit size of exception message in BigDecimalParser Mar 31, 2022
BigDecimalParser.parse(sb.toString());
fail("expected NumberFormatException");
} catch (NumberFormatException nfe) {
assertTrue("exception message starts as expected?", nfe.getMessage().startsWith("Value \"AAAAA"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also helper method verifyException in test base class for simple inclusion checks.
(this is fine too)

@cowtowncoder
Copy link
Member

Looks good; I think 1000 is reasonable.

@cowtowncoder cowtowncoder merged commit 48481e3 into FasterXML:2.13 Apr 1, 2022
cowtowncoder added a commit that referenced this pull request Apr 1, 2022
@cowtowncoder cowtowncoder modified the milestones: 2.10, 2.13.3 Apr 1, 2022
@cowtowncoder
Copy link
Member

Thank you @pjfanning! Will go in 2.13.3 release.

@pjfanning pjfanning deleted the big-decimal-parser-exception branch April 19, 2022 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants