Skip to content

Commit

Permalink
Declare ClassLoader for DeserializingConverter constructor as nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoeller authored and mdeinum committed Jun 29, 2023
1 parent f59e247 commit 4a874cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -50,6 +50,7 @@ public DefaultDeserializer() {
/**
* Create a {@code DefaultDeserializer} for using an {@link ObjectInputStream}
* with the given {@code ClassLoader}.
* @param classLoader the ClassLoader to use
* @since 4.2.1
* @see ConfigurableObjectInputStream#ConfigurableObjectInputStream(InputStream, ClassLoader)
*/
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -21,6 +21,7 @@
import org.springframework.core.convert.converter.Converter;
import org.springframework.core.serializer.DefaultDeserializer;
import org.springframework.core.serializer.Deserializer;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;

/**
Expand Down Expand Up @@ -50,10 +51,11 @@ public DeserializingConverter() {
/**
* Create a {@code DeserializingConverter} for using an {@link java.io.ObjectInputStream}
* with the given {@code ClassLoader}.
* @param classLoader the ClassLoader to use
* @since 4.2.1
* @see DefaultDeserializer#DefaultDeserializer(ClassLoader)
*/
public DeserializingConverter(ClassLoader classLoader) {
public DeserializingConverter(@Nullable ClassLoader classLoader) {
this.deserializer = new DefaultDeserializer(classLoader);
}

Expand Down

0 comments on commit 4a874cf

Please sign in to comment.