X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=restconf%2Frestconf-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Frestconf%2Fcommon%2Ferrors%2FRestconfError.java;fp=restconf%2Frestconf-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Frestconf%2Fcommon%2Ferrors%2FRestconfError.java;h=fbf66610efe66c29619735557e5747b0b081cea5;hb=6151f0444151183903debc231039dbf3183cd560;hp=f44717bdf86bde647d2b17053ce090421b45575e;hpb=e523bbd607bde2934e6e183dddc0e657dc3fa4e9;p=netconf.git
diff --git a/restconf/restconf-common/src/main/java/org/opendaylight/restconf/common/errors/RestconfError.java b/restconf/restconf-common/src/main/java/org/opendaylight/restconf/common/errors/RestconfError.java
index f44717bdf8..fbf66610ef 100644
--- a/restconf/restconf-common/src/main/java/org/opendaylight/restconf/common/errors/RestconfError.java
+++ b/restconf/restconf-common/src/main/java/org/opendaylight/restconf/common/errors/RestconfError.java
@@ -9,9 +9,7 @@ package org.opendaylight.restconf.common.errors;
import static java.util.Objects.requireNonNull;
-import java.io.Serial;
import java.io.Serializable;
-import java.util.Locale;
import org.opendaylight.yangtools.yang.common.ErrorTag;
import org.opendaylight.yangtools.yang.common.ErrorType;
import org.opendaylight.yangtools.yang.common.RpcError;
@@ -28,7 +26,7 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
* See also RESTCONF.
*/
public class RestconfError implements Serializable {
- @Serial
+ @java.io.Serial
private static final long serialVersionUID = 1L;
private final ErrorType errorType;
@@ -149,8 +147,7 @@ public class RestconfError implements Serializable {
if (rpcError.getCause() != null) {
localErrorInfo = rpcError.getCause().getMessage();
} else if (rpcError.getSeverity() != null) {
- localErrorInfo = "" + rpcError.getSeverity().toString().toLowerCase(Locale.ROOT)
- + "";
+ localErrorInfo = "" + rpcError.getSeverity().elementBody() + "";
}
} else {
localErrorInfo = rpcError.getInfo();