Skip to content

Commit 2841089

Browse files
committed
LoggingLevel注解逻辑修改
1 parent 3a2c0a8 commit 2841089

File tree

1 file changed

+5
-1
lines changed
  • framework/fel/java/services/tool-mcp-common/src/main/java/modelengine/fel/tool/mcp/entity

1 file changed

+5
-1
lines changed

framework/fel/java/services/tool-mcp-common/src/main/java/modelengine/fel/tool/mcp/entity/LoggingLevel.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,11 @@ public static LoggingLevel getDefault() {
9898
* @param code The code of logging level as a {@link String}.
9999
* @return The corresponding or default logging level as a {@link LoggingLevel}.
100100
*/
101-
public static LoggingLevel fromCode(@Nonnull String code) {
101+
@Nonnull
102+
public static LoggingLevel fromCode(String code) {
103+
if (code == null) {
104+
return LoggingLevel.getDefault();
105+
}
102106
for (LoggingLevel level : values()) {
103107
if (level.code.equalsIgnoreCase(code)) {
104108
return level;

0 commit comments

Comments
 (0)