Repository navigation
fix: NPE risk in ExamplesExporter.exportHeaders() when header values are empty - #2070
Conversation
…xporter Signed-off-by: ashnaaseth2325-oss <[email protected]>
|
Welcome to the Microcks community! 💖 Thanks and congrats 🎉 for opening your first pull request here! Be sure to follow the pull request template or please update it accordingly. Hope you have a great time there! |
|
Hello @yada @lbroudoux, |
Signed-off-by: Laurent Broudoux <[email protected]>
|
You are now a Microcks community contributor! 💖 Thanks and congrats 🚀 on merging your first pull request! We are delighted and very proud of you! 👏 📢 If you're using Microcks in your organization, please add your company name to this list. 🙏 It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact. If you need to know why and how to add yourself to the list, please read the blog post "Join the Microcks Adopters list and Empower the vibrant open source Community 🙌" Kudos and please keep going, we need you 🙌 |
Summary
Prevent a runtime exception when exporting headers by safely handling empty header value sets in
ExamplesExporter. This updatesexportHeaders()to avoid unsafeOptional#get()usage.Sites changed
ExamplesExporter#exportHeaders
Notes
Replaces unsafe
findFirst().get()withifPresent(...)to avoidNoSuchElementExceptionwhen a header has no values. Behavior remains unchanged for valid inputs; empty headers are now safely skipped instead of causing a crash.See #2058