Increase code coverage in spring-core serializer package

Closes gh-30744
This commit is contained in:
Adilson A
2023-06-25 11:32:14 +02:00
committed by Sam Brannen
parent f9b6aed6b6
commit 4979d8fded
3 changed files with 142 additions and 11 deletions

View File

@@ -67,8 +67,7 @@ public class DefaultDeserializer implements Deserializer<Object> {
@Override
@SuppressWarnings("resource")
public Object deserialize(InputStream inputStream) throws IOException {
ObjectInputStream objectInputStream = new ConfigurableObjectInputStream(inputStream, this.classLoader);
try {
try (ConfigurableObjectInputStream objectInputStream = new ConfigurableObjectInputStream(inputStream, this.classLoader)){
return objectInputStream.readObject();
}
catch (ClassNotFoundException ex) {