Skip to content

Commit be1bdc0

Browse files
committed
fix: receive message type assumption on nullish values
a too eager message type assumption using `getPayload(String)` on the message leads to `null`'is values not being thus. e.g. it's interpreted as `XML` instead of `PLAINTEXT`. occured during implementation of citrusframework/citrus-simulator#315.
1 parent 0409694 commit be1bdc0

File tree

7 files changed

+776
-651
lines changed

7 files changed

+776
-651
lines changed

.mvn/settings.xml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<settings>
2+
<mirrors>
3+
<mirror>
4+
<id>maven</id>
5+
<name>pf-central</name>
6+
<url>https://repo.pnet.ch/artifactory/eta-maven/</url>
7+
<mirrorOf>central</mirrorOf>
8+
</mirror>
9+
</mirrors>
10+
<servers>
11+
<server>
12+
<id>central</id>
13+
<username>${api.username}</username>
14+
<password>${api.password}</password>
15+
</server>
16+
<server>
17+
<id>snapshots</id>
18+
<username>${api.username}</username>
19+
<password>${api.password}</password>
20+
</server>
21+
</servers>
22+
<profiles>
23+
<profile>
24+
<id>artifactory</id>
25+
<activation>
26+
<activeByDefault>true</activeByDefault>
27+
</activation>
28+
<repositories>
29+
<repository>
30+
<id>central</id>
31+
<url>http://central</url>
32+
<releases>
33+
<enabled>true</enabled>
34+
</releases>
35+
<snapshots>
36+
<enabled>true</enabled>
37+
</snapshots>
38+
</repository>
39+
</repositories>
40+
<pluginRepositories>
41+
<pluginRepository>
42+
<id>central</id>
43+
<url>http://central</url>
44+
<releases>
45+
<enabled>true</enabled>
46+
</releases>
47+
<snapshots>
48+
<enabled>true</enabled>
49+
</snapshots>
50+
</pluginRepository>
51+
</pluginRepositories>
52+
</profile>
53+
</profiles>
54+
</settings>

core/citrus-api/src/main/java/org/citrusframework/CitrusSettings.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,17 @@
1616

1717
package org.citrusframework;
1818

19+
import org.citrusframework.common.TestLoader;
20+
import org.slf4j.Logger;
21+
import org.slf4j.LoggerFactory;
22+
1923
import java.io.File;
2024
import java.io.InputStream;
2125
import java.util.Map;
2226
import java.util.Properties;
2327
import java.util.Set;
2428
import java.util.stream.Stream;
2529

26-
import org.citrusframework.common.TestLoader;
27-
import org.citrusframework.message.MessageType;
28-
import org.slf4j.Logger;
29-
import org.slf4j.LoggerFactory;
30-
3130
import static java.lang.Boolean.parseBoolean;
3231
import static java.lang.System.getProperty;
3332
import static java.lang.System.getenv;
@@ -40,6 +39,7 @@
4039
import static org.citrusframework.common.TestLoader.JAVA;
4140
import static org.citrusframework.common.TestLoader.SPRING;
4241
import static org.citrusframework.common.TestLoader.YAML;
42+
import static org.citrusframework.message.MessageType.XML;
4343

4444
public final class CitrusSettings {
4545

@@ -211,7 +211,7 @@ private CitrusSettings() {
211211
public static final String DEFAULT_MESSAGE_TYPE = getPropertyEnvOrDefault(
212212
DEFAULT_MESSAGE_TYPE_PROPERTY,
213213
DEFAULT_MESSAGE_TYPE_ENV,
214-
MessageType.XML.toString());
214+
XML.toString());
215215

216216
/**
217217
* Flag to allow deactivation of the http message builder citrus header update. See <a href="https://github.com/citrusframework/citrus/issues/1143">ISSUE-1143</a> for details.

0 commit comments

Comments
 (0)