diff options
Diffstat (limited to 'sonar-core')
-rw-r--r-- | sonar-core/src/main/java/org/sonar/core/platform/ComponentContainer.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/platform/ComponentContainer.java b/sonar-core/src/main/java/org/sonar/core/platform/ComponentContainer.java index 5162e6a8d40..597311caf07 100644 --- a/sonar-core/src/main/java/org/sonar/core/platform/ComponentContainer.java +++ b/sonar-core/src/main/java/org/sonar/core/platform/ComponentContainer.java @@ -90,10 +90,15 @@ public class ComponentContainer implements ContainerPopulator.Container { } protected ComponentContainer(MutablePicoContainer picoContainer) { + this(picoContainer, new PropertyDefinitions()); + } + + protected ComponentContainer(MutablePicoContainer picoContainer, PropertyDefinitions propertyDefinitions) { + requireNonNull(propertyDefinitions, "PropertyDefinitions can not be null"); this.parent = null; this.pico = picoContainer; this.componentKeys = new ComponentKeys(); - propertyDefinitions = new PropertyDefinitions(); + this.propertyDefinitions = propertyDefinitions; addSingleton(propertyDefinitions); addSingleton(this); } |