Changeset 7171 for trunk/src/core/org


Ignore:
Timestamp:
Jun 9, 2016, 10:48:07 AM (7 years ago)
Author:
Nicklas Nordborg
Message:

References #2006 and #2016.

Fixed compilation errors by removing @Nonnull and @Nonnegative annotations.

Location:
trunk/src/core/org/anarres/parallelgzip
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/org/anarres/parallelgzip/ParallelGZIPEnvironment.java

    r7170 r7171  
    33import java.util.concurrent.ExecutorService;
    44import java.util.concurrent.Executors;
    5 import javax.annotation.Nonnull;
    65
    76/**
     
    1615    }
    1716
    18     @Nonnull
    1917    public static ExecutorService getSharedThreadPool() {
    2018        return ThreadPoolHolder.EXECUTOR;
  • trunk/src/core/org/anarres/parallelgzip/ParallelGZIPOutputStream.java

    r7170 r7171  
    2222import java.util.zip.DeflaterOutputStream;
    2323import java.util.zip.GZIPOutputStream;
    24 import javax.annotation.Nonnegative;
    25 import javax.annotation.Nonnull;
    2624
    2725/**
     
    3533    private final static int GZIP_MAGIC = 0x8b1f;
    3634
    37     @Nonnull
    3835    private static Deflater newDeflater() {
    3936        return new Deflater(Deflater.DEFAULT_COMPRESSION, true);
    4037    }
    4138
    42     @Nonnull
    43     private static DeflaterOutputStream newDeflaterOutputStream(@Nonnull OutputStream out, @Nonnull Deflater deflater) {
     39    private static DeflaterOutputStream newDeflaterOutputStream(OutputStream out, Deflater deflater) {
    4440        return new DeflaterOutputStream(out, deflater, 512, true);
    4541    }
     
    10298
    10399    // Master thread only
    104     public ParallelGZIPOutputStream(@Nonnull OutputStream out, @Nonnull ExecutorService executor, @Nonnegative int nthreads) throws IOException {
     100    public ParallelGZIPOutputStream(OutputStream out, ExecutorService executor, int nthreads) throws IOException {
    105101        super(out);
    106102        this.executor = executor;
     
    117113     * @throws IOException if it all goes wrong.
    118114     */
    119     public ParallelGZIPOutputStream(@Nonnull OutputStream out, @Nonnegative int nthreads) throws IOException {
     115    public ParallelGZIPOutputStream(OutputStream out, int nthreads) throws IOException {
    120116        this(out, ParallelGZIPEnvironment.getSharedThreadPool(), nthreads);
    121117    }
     
    129125     * @throws IOException if it all goes wrong.
    130126     */
    131     public ParallelGZIPOutputStream(@Nonnull OutputStream out) throws IOException {
     127    public ParallelGZIPOutputStream(OutputStream out) throws IOException {
    132128        this(out, Runtime.getRuntime().availableProcessors());
    133129    }
     
    213209    // Master thread only
    214210    /** Emits any opportunistically available blocks. Furthermore, emits blocks until the number of executing tasks is less than taskCountAllowed. */
    215     private void emitUntil(@Nonnegative int taskCountAllowed) throws IOException {
     211    private void emitUntil(int taskCountAllowed) throws IOException {
    216212        try {
    217213            while (emitQueue.size() > taskCountAllowed) {
Note: See TracChangeset for help on using the changeset viewer.