Github user neykov commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/203#discussion_r67383792
--- Diff:
core/src/main/java/org/apache/brooklyn/core/internal/BrooklynInitialization.java
---
@@ -61,21 +61,22 @@ public static void initLegacyLanguageExtensions() {
*
*/
- public synchronized static void initAll() {
- if (done.get()) return;
- initTypeCoercionStandardAdapters();
- initSecureKeysBouncyCastleProvider();
- initNetworking();
- initPortRanges();
- initLegacyLanguageExtensions();
- done.set(true);
+ public static void initAll() {
+ if (done.compareAndSet(false, true)) {
+ initTypeCoercionStandardAdapters();
+ initSecureKeysBouncyCastleProvider();
+ initNetworking();
+ initPortRanges();
+ initLegacyLanguageExtensions();
+ }
}
@SuppressWarnings("deprecation")
public synchronized static void reinitAll() {
- done.set(false);
- org.apache.brooklyn.util.core.BrooklynLanguageExtensions.reinit();
- initAll();
+ if (done.compareAndSet(true, false)) {
--- End diff --
This changes the behaviour - won't run if `initAll` is not called before
that. Better stick to the original, wdyt?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---