You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/10/18 11:58:50 UTC

[GitHub] [shardingsphere] notzero1995 commented on a change in pull request #13073: Think of it a different way to solve BeanDefinition is the abstract c…

notzero1995 commented on a change in pull request #13073:
URL: https://github.com/apache/shardingsphere/pull/13073#discussion_r730847348



##########
File path: shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-spring-infra/shardingsphere-jdbc-spring-namespace-infra/src/main/java/org/apache/shardingsphere/spring/namespace/registry/ShardingSphereAlgorithmBeanRegistry.java
##########
@@ -45,8 +45,7 @@
         String algorithmFactoryBeanClassName = algorithmFactoryBeanClass.getName();
         Map<String, RuntimeBeanReference> result = new ManagedMap<>(beanDefinitionNames.length);
         for (String each : beanDefinitionNames) {
-            String beanClassName = parserContext.getRegistry().getBeanDefinition(each).getBeanClassName();
-            if (null != beanClassName && beanClassName.equals(algorithmFactoryBeanClassName)) {
+            if (algorithmFactoryBeanClassName.equals(parserContext.getRegistry().getBeanDefinition(each).getBeanClassName())) {

Review comment:
       The code logic is no different, but the code is more clean. Another reason is to make up for my promise. So it doesn’t matter if there is no approval, I will close it as soon as possible




-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org