Skip to content

Commit 2b2028e

Browse files
1 parent 2e285e3 commit 2b2028e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

shared/src/main/java/com/vaadin/osgi/resources/impl/VaadinResourceTrackerComponent.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,11 @@ void unbindVaadinResourceService(VaadinResourceService vaadinService) {
151151
*/
152152
@Activate
153153
protected void activate(BundleContext context) {
154-
vaadinSharedContext = context;
155-
for (Delegate<?> registration : resourceToRegistration.values()) {
156-
registration.register(vaadinSharedContext, vaadinService);
154+
synchronized (resourceToRegistration) {
155+
vaadinSharedContext = context;
156+
for (Delegate<?> registration : resourceToRegistration.values()) {
157+
registration.register(context, vaadinService);
158+
}
157159
}
158160
}
159161

0 commit comments

Comments
 (0)