Skip to content

Commit c14f283

Browse files
Using the safe format
1 parent c1ac743 commit c14f283

File tree

1 file changed

+3
-1
lines changed
  • x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/amazonbedrock/translation

1 file changed

+3
-1
lines changed

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/amazonbedrock/translation/ChatCompletionRole.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
package org.elasticsearch.xpack.inference.services.amazonbedrock.translation;
99

10+
import org.elasticsearch.common.Strings;
11+
1012
import java.util.Locale;
1113

1214
public enum ChatCompletionRole {
@@ -24,7 +26,7 @@ public static ChatCompletionRole fromString(String name) {
2426
try {
2527
return valueOf(name.trim().toUpperCase(Locale.ROOT));
2628
} catch (IllegalArgumentException e) {
27-
throw new IllegalArgumentException(String.format("Received invalid role [%s]", name), e);
29+
throw new IllegalArgumentException(Strings.format("Received invalid role [%s]", name), e);
2830
}
2931
}
3032
}

0 commit comments

Comments
 (0)