pjfanning opened a new pull request, #101:
URL: https://github.com/apache/poi-xmlbeans/pull/101

   Reordering the switches in `XmlObjectBase.java_value` to put the `default` 
labels last silently changed what those defaults do when assertions are 
disabled:
   
   - The outer `default` (unexpected nonprimitive type code) used to fall 
through to `base.getStringValue()`; after the reorder it fell out of the switch 
and returned `null`.
   - The inner decimal-size `default` (invalid numeric bit count) used to fall 
through to `base.getBigDecimalValue()`; after the reorder it fell out of the 
inner switch and dropped into the `BTC_ANY_URI` case, returning the string 
value instead.
   
   Both paths are unreachable in normal operation (the assertions guard them in 
dev/test runs), but with `-da` the graceful fallbacks are part of observed 
behavior. This gives each `default` an explicit `return` matching the 
pre-reorder fallthrough target, drops the now-unreachable trailing `return 
null`, and fixes the stray indentation and duplicated comment the reorder left 
on the string cases.
   
   Compiled and ran `xmlobject.schematypes.detailed.ListAndUnionTests` locally.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to