diff --git a/spi/data-plane/data-plane-spi/src/main/java/org/eclipse/edc/connector/dataplane/spi/pipeline/StreamFailure.java b/spi/data-plane/data-plane-spi/src/main/java/org/eclipse/edc/connector/dataplane/spi/pipeline/StreamFailure.java index ddbe79e24f0..46b7a3f5dc2 100644 --- a/spi/data-plane/data-plane-spi/src/main/java/org/eclipse/edc/connector/dataplane/spi/pipeline/StreamFailure.java +++ b/spi/data-plane/data-plane-spi/src/main/java/org/eclipse/edc/connector/dataplane/spi/pipeline/StreamFailure.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * Copyright (c) 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at @@ -9,7 +9,6 @@ * * Contributors: * Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation - * zub4t - Improving failure detail message * */ @@ -33,11 +32,7 @@ public StreamFailure(List messages, Reason reason) { @Override public String getFailureDetail() { var str = super.getFailureDetail(); - if (str != null && !str.isEmpty()) { - str = reason + ": " + str; - return str; - } - return String.valueOf(reason); + return (str != null && !str.isEmpty()) ? (reason + ": " + str) : (reason + ""); } public Reason getReason() {