Skip to content

Conversation

@ricellis
Copy link
Member

Remove the final modifier from the BaseService#createServiceCall to allow extending services to override.

This provides a hook point that can be used to modify every request earlier than an interceptor is able to do so.

Added a test that will fail to compile if the final modifier is re-added inadvertently. The assertion itself is slightly pointless as it effectively validates the JVM's override functionality, but it seems nicer than having a "compile-only" test.

Note also as per JLS 13.4.17 is a binary compatible change.

Remove the `final` modifier from the BaseService#createServiceCall to allow extending services to override.
@ricellis ricellis force-pushed the createservicecall-override-2739 branch from cd8766d to 21049d9 Compare July 12, 2021 13:50
Copy link
Contributor

@padamstx padamstx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thank you for adding the test, and for including the reference to the info re: binary compatibility!

@padamstx padamstx merged commit 2e35d1f into main Jul 12, 2021
@padamstx padamstx deleted the createservicecall-override-2739 branch July 12, 2021 15:56
ibm-devx-sdk pushed a commit that referenced this pull request Jul 12, 2021
# [9.11.0](9.10.4...9.11.0) (2021-07-12) ### Features * **BaseService:** remove final modifier from createServiceCall ([#132](#132)) ([2e35d1f](2e35d1f))
@ibm-devx-sdk
Copy link
Contributor

🎉 This PR is included in version 9.11.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 participants