diff --git a/build.gradle b/build.gradle index 62f1b507f..7ec9c5a49 100644 --- a/build.gradle +++ b/build.gradle @@ -37,7 +37,7 @@ subprojects { // DO NOT FORGET TO DOCUMENT CHANGES IN CHANGELOG.md // // Add a GitHub release for every new release: https://github.com/otto-de/edison-microservice/releases - version = '1.1.0-beta.4-SNAPSHOT' + version = '1.1.0-beta.4' group = 'de.otto.edison' repositories { diff --git a/edison-core/src/main/java/de/otto/edison/authentication/configuration/LdapConfiguration.java b/edison-core/src/main/java/de/otto/edison/authentication/configuration/LdapConfiguration.java index 8daa5ba0e..f14bb74dd 100644 --- a/edison-core/src/main/java/de/otto/edison/authentication/configuration/LdapConfiguration.java +++ b/edison-core/src/main/java/de/otto/edison/authentication/configuration/LdapConfiguration.java @@ -25,7 +25,6 @@ public class LdapConfiguration { * All routes starting with the value of the {@code edison.ldap.prefix} property will be secured by LDAP. If no * property is set this will default to all routes starting with '/internal'. * - * @param prefix the prefix of routes authenticated by the ldap filter. Default is /internal * @param ldapProperties the properties used to configure LDAP * @return FilterRegistrationBean */ diff --git a/edison-jobs/src/main/java/de/otto/edison/jobs/eventbus/JobEvents.java b/edison-jobs/src/main/java/de/otto/edison/jobs/eventbus/JobEvents.java index e084ac3e9..3ac08fc88 100644 --- a/edison-jobs/src/main/java/de/otto/edison/jobs/eventbus/JobEvents.java +++ b/edison-jobs/src/main/java/de/otto/edison/jobs/eventbus/JobEvents.java @@ -2,8 +2,12 @@ import de.otto.edison.jobs.domain.Level; +import java.util.Collections; import java.util.LinkedHashSet; import java.util.Set; +import java.util.concurrent.ConcurrentSkipListSet; + +import static java.util.Collections.synchronizedSet; /** * Delegates the calls of {@link JobEventPublisher#info(String)}, @@ -16,7 +20,7 @@ public final class JobEvents { private static final ThreadLocal jobEventPublisherThreadLocal = new InheritableThreadLocal<>(); - private static final Set jobEventPublishers = new LinkedHashSet<>(); + private static final Set broadcastEventPublishers = synchronizedSet(new LinkedHashSet<>()); /** * Internal method. Should only be called inside edison-jobs. @@ -31,7 +35,7 @@ public static void register(final JobEventPublisher jobEventPublisher) { ); } jobEventPublisherThreadLocal.set(jobEventPublisher); - jobEventPublishers.add(jobEventPublisher); + broadcastEventPublishers.add(jobEventPublisher); } /** @@ -40,7 +44,7 @@ public static void register(final JobEventPublisher jobEventPublisher) { public static void deregister() { JobEventPublisher jobEventPublisher = jobEventPublisherThreadLocal.get(); if (jobEventPublisher != null) { - jobEventPublishers.remove(jobEventPublisher); + broadcastEventPublishers.remove(jobEventPublisher); } jobEventPublisherThreadLocal.remove(); } @@ -80,9 +84,10 @@ public static void info(final String message) { * * @param level * @param message + * @since 1.1.0 */ public static void broadcast(final Level level, final String message) { - for (JobEventPublisher jobEventPublisher : jobEventPublishers) { + for (JobEventPublisher jobEventPublisher : broadcastEventPublishers) { jobEventPublisher.message(level, message); } }