mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
Polish contribution
See gh-36833
This commit is contained in:
+2
-2
@@ -61,8 +61,8 @@ public class DefaultDeserializer implements Deserializer<Object> {
|
||||
|
||||
/**
|
||||
* Return the {@link ClassLoader} to use for deserialization, or {@code null}
|
||||
* to use the "latest user-defined ClassLoader" of {@link ObjectInputStream}.
|
||||
* @since 7.1
|
||||
* to use the "latest user-defined ClassLoader".
|
||||
* @since 6.2.19
|
||||
* @see ConfigurableObjectInputStream#ConfigurableObjectInputStream(InputStream, ClassLoader)
|
||||
*/
|
||||
public @Nullable ClassLoader getClassLoader() {
|
||||
|
||||
@@ -78,12 +78,12 @@ class SerializerTests {
|
||||
assertThat(deserializer.expectedInputStream).isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
@Test // gh-36833
|
||||
void defaultDeserializerExposesNullClassLoaderByDefault() {
|
||||
assertThat(new DefaultDeserializer().getClassLoader()).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
@Test // gh-36833
|
||||
void defaultDeserializerExposesConfiguredClassLoader() {
|
||||
ClassLoader classLoader = getClass().getClassLoader();
|
||||
assertThat(new DefaultDeserializer(classLoader).getClassLoader()).isSameAs(classLoader);
|
||||
|
||||
Reference in New Issue
Block a user