Skip to content

Commit b7b0b0a

Browse files
authored
Merge branch 'master' into feature/jaxrs-tls-config
2 parents 35aeb0e + f78dfaf commit b7b0b0a

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
* Fixed vulnerabilities: CVE-2024-13009(Jetty), CVE-2025-23184(Apache CXF), CVE-2024-57699 (Json-smart),CVE-2025-27533 (ActiveMQ)
2525
* Logging improvement and extension options for DaemonMessageListener
2626
* Add TLS server parameters for JAX-RS
27+
* Improved Errormessage in case of non parseable JSON strings in the space of InterconnectObjects and Messsaging.
28+
2729

2830
# 1.37
2931
* Major bug in interconnect core: DaemonScanner causes IllegalArgumentException due to wrong path of TimeoutException

interconnect/core/src/main/java/de/taimos/dvalin/interconnect/core/daemon/model/InterconnectResponseContext.java

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public InterconnectResponseContext(@Nonnull TextMessage message, boolean secure,
6464
InterconnectContextBuilder receivedContextBuilder = new InterconnectContextBuilder() //
6565
.withTarget(JmsTarget.RECEPTION_CONTEXT).withSecure(secure) //
6666
.withRequestICO(receivedIco) //
67-
.withCorrelationId(this.extractCorreationId()) //
67+
.withCorrelationId(this.extractCorrelationId()) //
6868
.withReplyToDestination(this.getReplyToDestination());
6969
this.receivedContext = receivedContextBuilder.build();
7070
}
@@ -77,7 +77,7 @@ private Destination getReplyToDestination() throws InfrastructureException {
7777
}
7878
}
7979

80-
private String extractCorreationId() throws InfrastructureException {
80+
private String extractCorrelationId() throws InfrastructureException {
8181
try {
8282
return this.getReceivedMessage().getJMSCorrelationID();
8383
} catch (JMSException e) {
@@ -88,8 +88,10 @@ private String extractCorreationId() throws InfrastructureException {
8888
private InterconnectObject extractIco() throws InfrastructureException {
8989
try {
9090
return InterconnectMapper.fromJson(this.getReceivedMessage().getText(), InterconnectObject.class);
91-
} catch (final IOException | JMSException e) {
92-
throw new InfrastructureException("Failed to create ico from message");
91+
} catch (final IOException e) {
92+
throw new InfrastructureException("Failed to create ico from message. Json parsing failed.", e);
93+
} catch (final JMSException e) {
94+
throw new InfrastructureException("Failed to read message content from received message!", e);
9395
}
9496
}
9597

@@ -166,20 +168,16 @@ public HandlingDuration handlingDuration() {
166168
* @return a default timeout message for logging or exceptions
167169
*/
168170
public String timeoutMessage() {
169-
return "Response skipped because runtime " + this.getLastHandlingRuntime() + " ms was greater than timeout " +
170-
this.getCreateResponseMethod().getTimeoutInMs() + " ms for " +
171-
this.getCreateResponseMethod().getMethod().getName() + "(" +
172-
this.getReceivedContext().getIcoClass().getSimpleName() + ")" + " with " +
173-
de.taimos.dvalin.interconnect.model.InterconnectContext.getContext();
171+
return "Response skipped because runtime " + this.getLastHandlingRuntime() + " ms was greater than timeout " + this.getCreateResponseMethod()
172+
.getTimeoutInMs() + " ms for " + this.getCreateResponseMethod().getMethod().getName() + "(" + this.getReceivedContext().getIcoClass()
173+
.getSimpleName() + ")" + " with " + de.taimos.dvalin.interconnect.model.InterconnectContext.getContext();
174174
}
175175

176176
/**
177177
* @return a default slow response message for logging or exceptions
178178
*/
179179
public String slowResponseMessage() {
180-
return "Slow response because runtime " + this.getLastHandlingRuntime() + " ms for " +
181-
this.getCreateResponseMethod().getMethod().getName() + "(" +
182-
this.getReceivedContext().getIcoClass().getSimpleName() + ")" + " with " +
183-
de.taimos.dvalin.interconnect.model.InterconnectContext.getContext();
180+
return "Slow response because runtime " + this.getLastHandlingRuntime() + " ms for " + this.getCreateResponseMethod().getMethod()
181+
.getName() + "(" + this.getReceivedContext().getIcoClass().getSimpleName() + ")" + " with " + de.taimos.dvalin.interconnect.model.InterconnectContext.getContext();
184182
}
185183
}

0 commit comments

Comments
 (0)