From 15d72e466380ac1b938bea2212aecf118c026a0d Mon Sep 17 00:00:00 2001 From: Martin Cousido Date: Thu, 20 Oct 2022 14:32:38 -0300 Subject: [PATCH] Using listable typeloader for all createTypeLoader methods --- api-changes.json | 12 ++++++++++++ .../metadata/ExpressionLanguageMetadataService.java | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/api-changes.json b/api-changes.json index 670585d81..11292e603 100644 --- a/api-changes.json +++ b/api-changes.json @@ -141,6 +141,18 @@ "methodName": "addType", "elementKind": "method", "justification": "Support resolving types coming from mule in DW transformations" + }, + { + "code": "java.method.returnTypeChangedCovariantly", + "old": "method org.mule.metadata.api.TypeLoader org.mule.runtime.api.metadata.ExpressionLanguageMetadataService::createTypeLoader(java.lang.String, org.mule.metadata.api.model.MetadataFormat)", + "new": "method org.mule.metadata.api.ListableTypeLoader org.mule.runtime.api.metadata.ExpressionLanguageMetadataService::createTypeLoader(java.lang.String, org.mule.metadata.api.model.MetadataFormat)", + "oldType": "org.mule.metadata.api.TypeLoader", + "newType": "org.mule.metadata.api.ListableTypeLoader", + "package": "org.mule.runtime.api.metadata", + "classSimpleName": "ExpressionLanguageMetadataService", + "methodName": "createTypeLoader", + "elementKind": "method", + "justification": "Now DataWeave type loader can list all the types available on the script" } ] } diff --git a/src/main/java/org/mule/runtime/api/metadata/ExpressionLanguageMetadataService.java b/src/main/java/org/mule/runtime/api/metadata/ExpressionLanguageMetadataService.java index c1f3f37e4..5336cb46f 100644 --- a/src/main/java/org/mule/runtime/api/metadata/ExpressionLanguageMetadataService.java +++ b/src/main/java/org/mule/runtime/api/metadata/ExpressionLanguageMetadataService.java @@ -130,9 +130,9 @@ public interface ExpressionLanguageMetadataService extends Service { * * @param content The script * @param metadataFormat The format that will be used for the loaded types - * @return The type loader + * @return The listable type loader */ - TypeLoader createTypeLoader(String content, MetadataFormat metadataFormat); + ListableTypeLoader createTypeLoader(String content, MetadataFormat metadataFormat); /**