Sonar代码问题修改

This commit is contained in:
liuzhaotian
2024-10-29 17:19:05 +08:00
parent 334536bd03
commit 2239cfb84f
15 changed files with 138 additions and 166 deletions
@@ -9,6 +9,7 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import java.io.IOException;
import java.io.Serial;
/**
* XSS 过滤 jackson 反序列化器。
@@ -55,5 +56,19 @@ public class XssStringJsonDeserializer extends StringDeserializer {
}
return (String) ctxt.handleUnexpectedToken(_valueClass, p);
}
@Serial
private void writeObject(java.io.ObjectOutputStream stream)
throws IOException {
stream.defaultWriteObject();
}
@Serial
private void readObject(java.io.ObjectInputStream stream)
throws IOException, ClassNotFoundException {
stream.defaultReadObject();
}
}