Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor clientfactory customizer #27653

Conversation

saragluna
Copy link
Member

@saragluna saragluna commented Mar 14, 2022

According to the API review, this PR will split the ClientFactoryCustomizer into two separate factory customizers. https://apiview.dev/Assemblies/Conversation/75bcb52fc5c74dbcaa45847030d90f4b

@ghost ghost added the azure-spring All azure-spring related issues label Mar 14, 2022
@azure-sdk
Copy link
Collaborator

API changes have been detected in com.azure.spring:spring-cloud-azure-core. You can review API changes here

@azure-sdk
Copy link
Collaborator

API changes have been detected in com.azure.spring:spring-cloud-azure-stream-binder-servicebus. You can review API changes here

@azure-sdk
Copy link
Collaborator

API changes have been detected in com.azure.spring:spring-cloud-azure-stream-binder-eventhubs. You can review API changes here

Copy link
Member

@yiliuTo yiliuTo left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -225,7 +223,7 @@ private EventHubsTemplate getEventHubTemplate() {
DefaultEventHubsNamespaceProducerFactory factory = new DefaultEventHubsNamespaceProducerFactory(
this.namespaceProperties, getProducerPropertiesSupplier());

clientFactoryCustomizers.forEach(customizer -> customizer.customize(factory));
producerFactoryCustomizers.forEach(customizer -> customizer.customize(factory));
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we design the interface to accept an argument of abstract type while in the implementation use its implementation? How about always using the implementation for clarity? By this way, we avoid the is instanceof judgement then.

Copy link
Member Author

Choose a reason for hiding this comment

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

We should use API instead of impl classes in APIs.

@saragluna
Copy link
Member Author

/azp run java - spring - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@saragluna saragluna merged commit 92e6bca into Azure:feature/azure-spring-cloud-4.0 Mar 15, 2022
@saragluna saragluna deleted the xiada/fix-clientfactory-customizer branch March 17, 2022 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
azure-spring All azure-spring related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants