Skip to content

TOMEE-4589 - Trim whitespace in numeric/enum descriptor values#2794

Open
rzo1 wants to merge 1 commit into
tomee-10.xfrom
TOMEE-4589
Open

TOMEE-4589 - Trim whitespace in numeric/enum descriptor values#2794
rzo1 wants to merge 1 commit into
tomee-10.xfrom
TOMEE-4589

Conversation

@rzo1

@rzo1 rzo1 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

session-timeout (and the other xsd:integer / numeric / temporal / enum descriptor values) use a whitespace="collapse" facet, so a value such as

  <session-timeout>
      30
  </session-timeout>

is valid and must parse. The SXC-generated accessors fed the raw element text straight into Integer.valueOf()/etc. for wrapper, temporal, decimal and enum types, which failed with NumberFormatException.

Bump SXC to 0.10 (which collapses whitespace in the generator) and regenerate the affected accessors, applying only the resulting .trim() additions so the change stays limited to the fix. Adds a regression test.

@rzo1 rzo1 requested a review from jungm June 25, 2026 08:48
session-timeout (and the other xsd:integer / numeric / temporal / enum
descriptor values) use a whitespace="collapse" facet, so a value such as

  <session-timeout>
      30
  </session-timeout>

is valid and must parse. The SXC-generated accessors fed the raw element
text straight into Integer.valueOf()/etc. for wrapper, temporal, decimal
and enum types, which failed with NumberFormatException.

Bump SXC to 0.10 (which collapses whitespace in the generator) and
regenerate the affected accessors, applying only the resulting .trim()
additions so the change stays limited to the fix. Adds a regression test.
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.

2 participants