Skip to content

Commit

Permalink
Minor cleanups.
Browse files Browse the repository at this point in the history
  • Loading branch information
tgregg committed Jan 14, 2025
1 parent 514ca6c commit c5bb18e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/main/java/com/amazon/ion/system/IonReaderBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,7 @@ public IonBufferConfiguration getBufferConfiguration() {
* is required, it is up to the caller to provide a custom interceptor implementation to
* achieve this.
* <p>
* As an alternative, or in addition, to adding stream interceptors manually using this method,
* users may register implementations as service providers on the classpath.
* Users may also or instead register implementations as service providers on the classpath.
* See {@link ServiceLoader} for details about how to do this.
* <p>
* The list of stream interceptors available to the reader always begins with
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@

import com.github.luben.zstd.ZstdInputStream;
import com.github.luben.zstd.ZstdOutputStream;
import org.junit.Test;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.RepeatedTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.EnumSource;

import static org.junit.Assert.assertSame;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertSame;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;

Expand All @@ -55,7 +55,7 @@ public static class ZstdStreamInterceptor implements InputStreamInterceptor {

@Override
public String formatName() {
return "Zstd";
return "zstd";
}

@Override
Expand Down Expand Up @@ -310,7 +310,9 @@ public void differentClassLoadersInEachThread() throws Exception {
assertEquals(1, streamInterceptors.size());
assertSame(GzipStreamInterceptor.INSTANCE, streamInterceptors.get(0));
});

AtomicReference<Throwable> withDefaultClassLoaderError = registerExceptionHandler(withDefaultClassLoader);

Thread withCustomClassLoader = new Thread(() -> {
AtomicReference<List<?>> streamInterceptors = new AtomicReference<>();
executeWithCustomClassLoader(
Expand All @@ -331,6 +333,7 @@ public void differentClassLoadersInEachThread() throws Exception {
}
);
});

AtomicReference<Throwable> withCustomClassLoaderError = registerExceptionHandler(withCustomClassLoader);
withCustomClassLoader.setContextClassLoader(new CustomInterceptorClassLoader());

Expand Down

0 comments on commit c5bb18e

Please sign in to comment.