Polish contribution

See gh-36833
This commit is contained in:
Sam Brannen
2026-05-26 16:39:30 +02:00
parent f7be796c1c
commit 6e122d3aaa
2 changed files with 4 additions and 4 deletions
@@ -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);