Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

citrus 4 0 release #188

Merged
merged 1 commit into from
Oct 30, 2023
Merged

citrus 4 0 release #188

merged 1 commit into from
Oct 30, 2023

Conversation

bbortt
Copy link
Collaborator

@bbortt bbortt commented Oct 25, 2023

No description provided.

@bbortt bbortt self-assigned this Oct 25, 2023
@bbortt bbortt force-pushed the feature/citrus-4-0-release branch from f94c40a to db8ddeb Compare October 25, 2023 18:24
@bbortt
Copy link
Collaborator Author

bbortt commented Oct 25, 2023

did someone of you @christophd / @tschlat change something regarding XML / java property loading? the inbound dictionary did load this before the citrus 4.0.0 release (e.g. milestone 2):

image

now it contains this:

image

talking about the failing sample-swdl... I wonder how the changes could affect the java properties loading.

@bbortt bbortt force-pushed the feature/citrus-4-0-release branch from db8ddeb to 55ecff6 Compare October 25, 2023 19:02
@bbortt bbortt added IN PROGRESS Type: Maintenance Prio: High dependencies Pull requests that update a dependency file java Pull requests that update Java code labels Oct 25, 2023
@bbortt
Copy link
Collaborator Author

bbortt commented Oct 30, 2023

ok, I've tracked it down to the AbstractDataDictionary:

index a5952919a..88cd18db8 100644
--- a/core/citrus-base/src/main/java/org/citrusframework/variable/dictionary/AbstractDataDictionary.java
+++ b/core/citrus-base/src/main/java/org/citrusframework/variable/dictionary/AbstractDataDictionary.java
@@ -73,14 +73,17 @@ public abstract class AbstractDataDictionary<T> extends AbstractMessageProcessor
     @Override
     public void initialize() {
         if (mappingFile != null) {
-
             if (logger.isDebugEnabled()) {
                 logger.debug("Reading data dictionary mapping " + mappingFile.getLocation());
             }

             Properties props = new Properties();
             try (InputStream inputStream = mappingFile.getInputStream()) {
-                props.load(inputStream);
+                if (mappingFile.getFile().getName().endsWith(".xml")) {
+                    props.loadFromXML(inputStream);
+                } else {
+                    props.load(inputStream);
+                }
             } catch (IOException e) {
                 throw new CitrusRuntimeException(e);
             }

@christophd either we need a citrus release 4.0.1 (and then I am questioning if (mappingFile.getFile().getName().endsWith(".xml")) {, that would probably go better?) or we drop the mapping-as-xml-file feature.. what do you think?

Edit: I would discourage from dropping the mapping-as-xml-file support, because the property in the simulator is named citrus.simulator.inboundXmlDictionary and citrus.simulator.outboundXmlDictionary what implicitly tells the user that it is an XML mapping-as-xml-file.

@bbortt bbortt force-pushed the feature/citrus-4-0-release branch from 55ecff6 to fe7888c Compare October 30, 2023 09:37
@bbortt bbortt merged commit 204b777 into main Oct 30, 2023
6 checks passed
@bbortt bbortt deleted the feature/citrus-4-0-release branch February 8, 2024 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file IN PROGRESS java Pull requests that update Java code Prio: High Type: Maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant