Fix config save stripping backslashes from property values#617
Conversation
toStringConfiguration() emitted raw key=value text, but every save re-parses it with Properties.load(), which eats backslashes: pool domain regexes like (\Qhost\E) silently became (QhostE) and stopped matching. Serialize with Properties.store() so the round-trip is symmetric. Fixes diennea#608
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughSummary Assessment against linked issues
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
Every config save re-serializes the whole configuration as raw
key=valuetext and re-parses it withProperties.load(), which treats\as an escape and silently drops it.Thus, any backslash-bearing value is corrupted: a connection-pool domain like
(\Qhost.example\E)becomes(Qhost.exampleE), the regex stops matching, and traffic silently falls back to the default pool. Both the connection-pool CRUD API and the config editor hit this path.Implementation
Make the round-trip symmetric:
toStringConfiguration()now serializes withProperties.store(), which escapes values exactly asload()expects. The timestamp commentstore()prepends is stripped and lines are kept sorted, preserving the deterministic dump format.Fixes #608