Skip to content

Commit

Permalink
GH-248 - Polishing.
Browse files Browse the repository at this point in the history
Minor code cleanup.
  • Loading branch information
odrotbohm committed Sep 7, 2023
1 parent 0906a2b commit 039e10d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@
@Import(PersistentDomainEventsImportSelector.class)
public @interface EnablePersistentDomainEvents {

/**
* {@link ImportSelector} to dynamically pick up configuration types from the classpath.
*
* @author Oliver Drotbohm
*/
static class PersistentDomainEventsImportSelector implements ImportSelector, ResourceLoaderAware {

private ResourceLoader resourceLoader;
Expand All @@ -65,6 +70,7 @@ public void setResourceLoader(ResourceLoader resourceLoader) {
* @see org.springframework.context.annotation.ImportSelector#selectImports(org.springframework.core.type.AnnotationMetadata)
*/
@Override
@SuppressWarnings("deprecation")
public String[] selectImports(AnnotationMetadata importingClassMetadata) {

List<String> result = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.Role;
import org.springframework.core.env.Environment;
import org.springframework.lang.NonNull;
import org.springframework.modulith.events.config.EventPublicationAutoConfiguration.AsyncEnablingConfiguration;
import org.springframework.modulith.events.core.EventPublicationRegistry;
import org.springframework.modulith.events.core.EventPublicationRepository;
Expand Down Expand Up @@ -109,6 +110,7 @@ static class AsyncPropertiesDefaulter implements BeanPostProcessor {
* (non-Javadoc)
* @see org.springframework.beans.factory.config.BeanPostProcessor#postProcessAfterInitialization(java.lang.Object, java.lang.String)
*/
@NonNull
@Override
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {

Expand Down

0 comments on commit 039e10d

Please sign in to comment.