Skip to content

Commit 7e881f6

Browse files
author
Pawel Badenski
committed
Simplify concurrency code
1 parent 819bae3 commit 7e881f6

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/main/java/org/axonframework/intellij/ide/plugin/publisher/DefaultEventPublisherProvider.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,8 @@ class DefaultEventPublisherProvider implements EventPublisherProvider {
3535
@Override
3636
public void scanPublishers(final Project project, GlobalSearchScope scope, final Registrar registrar) {
3737
cleanClosedProjects();
38+
publisherMethodsPerProject.putIfAbsent(project, new HashSet<PsiMethod>());
3839
Set<PsiMethod> psiMethods = publisherMethodsPerProject.get(project);
39-
if (psiMethods == null) {
40-
final Set<PsiMethod> newHashSet = new HashSet<PsiMethod>();
41-
psiMethods = publisherMethodsPerProject.putIfAbsent(project, newHashSet);
42-
if (psiMethods == null) {
43-
psiMethods = newHashSet;
44-
}
45-
}
4640
psiMethods.addAll(findMethods(project, GlobalSearchScope.allScope(project),
4741
"org.axonframework.eventsourcing.AbstractEventSourcedAggregateRoot", "apply"));
4842
psiMethods.addAll(findMethods(project, GlobalSearchScope.allScope(project),

0 commit comments

Comments
 (0)