Skip to content

Update token on 19-digit long coercion in isExpectedNumberIntToken - #890

Open
Sahana2524 wants to merge 1 commit into
FasterXML:3.xfrom
Sahana2524:int-coercion-token-count
Open

Update token on 19-digit long coercion in isExpectedNumberIntToken#890
Sahana2524 wants to merge 1 commit into
FasterXML:3.xfrom
Sahana2524:int-coercion-token-count

Conversation

@Sahana2524

Copy link
Copy Markdown
Contributor

isExpectedNumberIntToken() skips the token-count update for one integer-length branch:

  • the len == 19 in-long-range case sets _currToken directly, while the <=9, <=18 and BigInteger branches (and 2.x) all go through _updateToken()
  • so coercing a 19-digit long to VALUE_NUMBER_INT is not counted, leaving currentTokenCount() and the maxTokenCount read constraint short for those values

Routed it through _updateToken() like the sibling branches; no effect when token counting is off.

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

🧪 Code Coverage Report

Metric Coverage Change
Instructions coverage 74.05% 📈 +0.340%
Branches branches 68.83% 📈 +0.270%

Coverage data generated from JaCoCo test results

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.

1 participant