gnodet opened a new pull request, #22971:
URL: https://github.com/apache/camel/pull/22971

   **Depends on:** #22962
   
   ## Summary
   
   Code cleanup and quality improvements for the `camel-diagram` module:
   
   - Fix `Graphics2D` resource leak in constructor (try-finally)
   - Replace `int[]` bounding box pattern with typed `Bounds` class
   - Reduce visibility of internal-only APIs (`H_GAP`, `LABEL_OFFSET`, 
`findLastLayoutNode`, `findMaxY`, etc.)
   - Remove redundant instance `resolveLabel` wrapper
   - Extract `getTopY()` helper to deduplicate scope-check ternary in renderer
   - Share `NODE_TEXT_PADDING` via getter instead of duplicating magic constant
   - Named constants for magic numbers (`DEFAULT_FONT_SIZE`, 
`DEFAULT_BOX_WIDTH`, `DEFAULT_NODE_HEIGHT`)
   - Fix `wrapLabel` to use `BreakIterator` for grapheme-safe Unicode handling 
(emojis, combining marks, ZWJ sequences like ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ)
   - Add null-guard in JSON route parsing
   
   ## Test plan
   
   - [x] 50 diagram tests pass (3 new for Unicode wrapping: emoji, combining 
marks, ZWJ sequences)
   - [x] 4 jbang-core action tests pass
   - [x] External consumer (`CamelRouteDiagramAction`) compiles and tests pass


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

Reply via email to