Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address review comments by @aherbert
  • Loading branch information
adamretter committed Apr 3, 2020
commit 64fbcf74fba5fa2a718342a8b47a4a790cd4b136
5 changes: 0 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,6 @@ file comparators, endian transformation classes, and much more.
</contributors>

<dependencies>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@
import java.io.InputStream;
import java.io.OutputStream;

import javax.annotation.concurrent.ThreadSafe;

/**
* This class implements a ThreadSafe version of
* {@link AbstractByteArrayOutputStream} using instance
* synchronisation.
*/
@ThreadSafe
//@ThreadSafe
public class ByteArrayOutputStream extends AbstractByteArrayOutputStream {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,13 @@
import java.io.InputStream;
import java.io.OutputStream;

import javax.annotation.concurrent.NotThreadSafe;

/**
* This class implements a version of {@link AbstractByteArrayOutputStream}
* <b>without</b> any concurrent thread safety.
*
* @since 2.7
*/
@NotThreadSafe
//@NotThreadSafe
public final class FastByteArrayOutputStream extends AbstractByteArrayOutputStream {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,10 @@ public void testStream(final String baosName, final BAOSFactory baosFactory) thr

private static Stream<Arguments> baosFactories() {
final BAOSFactory syncBaosFactory = size -> new ByteArrayOutputStream(size);
final BAOSFactory nonSyncBaos = size -> new FastByteArrayOutputStream(size);
final BAOSFactory nonSyncBaosFactory = size -> new FastByteArrayOutputStream(size);
return Stream.of(
Arguments.of(ByteArrayOutputStream.class.getSimpleName(), syncBaosFactory),
Arguments.of(FastByteArrayOutputStream.class.getSimpleName(), nonSyncBaos)
Arguments.of(FastByteArrayOutputStream.class.getSimpleName(), nonSyncBaosFactory)
);
}

Expand Down