This is an automated email from the ASF dual-hosted git repository.

heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-server.git

commit 49d4edd6fa585f2481a7253e7bef58f6c38882ae
Author: Alex Heneveld <[email protected]>
AuthorDate: Thu Oct 1 13:40:07 2020 +0100

    fix the osgi bean load problem (test now passes)
---
 .../brooklyn/core/catalog/internal/BasicBrooklynCatalog.java       | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git 
a/core/src/main/java/org/apache/brooklyn/core/catalog/internal/BasicBrooklynCatalog.java
 
b/core/src/main/java/org/apache/brooklyn/core/catalog/internal/BasicBrooklynCatalog.java
index 096b0e4..ea8efab 100644
--- 
a/core/src/main/java/org/apache/brooklyn/core/catalog/internal/BasicBrooklynCatalog.java
+++ 
b/core/src/main/java/org/apache/brooklyn/core/catalog/internal/BasicBrooklynCatalog.java
@@ -1848,8 +1848,13 @@ public class BasicBrooklynCatalog implements 
BrooklynCatalog {
             // (the legacy routines this uses don't support that type of 
context)
             String yaml = 
RegisteredTypes.getImplementationDataStringForSpec(typeToValidate);
             CatalogBundle bundle = typeToValidate.getContainingBundle() != 
null ? 
CatalogItemDtoAbstract.parseLibraries(Arrays.asList(typeToValidate.getContainingBundle())).iterator().next()
 : null;
+            CatalogItemType itemType = boType!=null ? 
CatalogItemType.ofTargetClass(boType.getInterfaceType()) : null;
+            if (itemType==null && typeToValidate.getKind() == 
RegisteredTypeKind.BEAN) {
+                itemType = CatalogItemType.BEAN;
+            }
+            String format = typeToValidate.getPlan().getPlanFormat();
             PlanInterpreterInferringType guesser = new 
PlanInterpreterInferringType(typeToValidate.getSymbolicName(), 
Iterables.getOnlyElement( Yamls.parseAll(yaml) ),
-                yaml, null, null, bundle, 
CatalogItemDtoAbstract.parseLibraries( typeToValidate.getLibraries() ), null);
+                yaml, itemType, format, bundle, 
CatalogItemDtoAbstract.parseLibraries( typeToValidate.getLibraries() ), null);
             guesser.resolve();
             guesserErrors.addAll(guesser.getErrors());
             

Reply via email to