AlbumenJ commented on code in PR #12834: URL: https://github.com/apache/dubbo/pull/12834#discussion_r1283240628
########## dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/context/DubboSpringInitializer.java: ########## @@ -68,14 +68,15 @@ public static boolean remove(BeanDefinitionRegistry registry) { } public static boolean remove(ApplicationContext springContext) { + AutowireCapableBeanFactory autowireCapableBeanFactory = springContext.getAutowireCapableBeanFactory(); for (Map.Entry<BeanDefinitionRegistry, DubboSpringInitContext> entry : contextMap.entrySet()) { DubboSpringInitContext initContext = entry.getValue(); if (initContext.getApplicationContext() == springContext || - initContext.getBeanFactory() == springContext.getAutowireCapableBeanFactory() || - initContext.getRegistry() == springContext.getAutowireCapableBeanFactory() + initContext.getBeanFactory() == autowireCapableBeanFactory || + initContext.getRegistry() == autowireCapableBeanFactory ) { DubboSpringInitContext context = contextMap.remove(entry.getKey()); - logger.info("Unbind " + safeGetModelDesc(context.getModuleModel()) + " from spring container: " + + logger.info("Unbind " + context.getModuleModel().getDesc() + " from spring container: " + Review Comment: Is it possible throws NPE here? -- 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-unsubscr...@dubbo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org