Optimized imports

This commit is contained in:
Arjen Poutsma 2015-10-30 09:24:53 +01:00
parent e121f7ecd4
commit 6006fa6ec2
19 changed files with 81 additions and 110 deletions

View File

@ -16,8 +16,9 @@
package org.springframework.http.server;
import org.springframework.http.HttpStatus;
import org.reactivestreams.Publisher;
import org.springframework.http.HttpStatus;
import org.springframework.http.ReactiveHttpOutputMessage;
/**

View File

@ -16,18 +16,19 @@
package org.springframework.reactive.codec.decoder;
import java.io.IOException;
import java.nio.ByteBuffer;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectReader;
import org.reactivestreams.Publisher;
import reactor.Publishers;
import org.springframework.core.ResolvableType;
import org.springframework.http.MediaType;
import org.springframework.reactive.codec.CodecException;
import org.springframework.reactive.codec.encoder.JacksonJsonEncoder;
import org.springframework.reactive.io.ByteBufferInputStream;
import reactor.Publishers;
import java.io.IOException;
import java.nio.ByteBuffer;
/**
* Decode from a bytes stream of JSON objects to a stream of {@code Object} (POJO).

View File

@ -16,27 +16,32 @@
package org.springframework.reactive.codec.decoder;
import java.nio.ByteBuffer;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import javax.xml.bind.UnmarshalException;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.transform.Source;
import javax.xml.transform.sax.SAXSource;
import javax.xml.transform.stream.StreamSource;
import org.reactivestreams.Publisher;
import org.springframework.core.ResolvableType;
import org.springframework.http.MediaType;
import org.springframework.reactive.codec.CodecException;
import org.springframework.reactive.codec.encoder.Jaxb2Encoder;
import org.springframework.reactive.io.ByteBufferPublisherInputStream;
import org.springframework.util.Assert;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.XMLReaderFactory;
import reactor.Publishers;
import javax.xml.bind.*;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.transform.Source;
import javax.xml.transform.sax.SAXSource;
import javax.xml.transform.stream.StreamSource;
import java.nio.ByteBuffer;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import org.springframework.core.ResolvableType;
import org.springframework.http.MediaType;
import org.springframework.reactive.codec.CodecException;
import org.springframework.reactive.codec.encoder.Jaxb2Encoder;
import org.springframework.reactive.io.ByteBufferPublisherInputStream;
import org.springframework.util.Assert;
/**
* Decode from a bytes stream of XML elements to a stream of {@code Object} (POJO).

View File

@ -16,20 +16,20 @@
package org.springframework.reactive.codec.decoder;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.List;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufUtil;
import io.netty.buffer.Unpooled;
import org.reactivestreams.Publisher;
import org.springframework.core.ResolvableType;
import org.springframework.http.MediaType;
import org.springframework.reactive.codec.encoder.JsonObjectEncoder;
import reactor.Publishers;
import reactor.fn.Function;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.List;
import org.springframework.core.ResolvableType;
import org.springframework.http.MediaType;
import org.springframework.reactive.codec.encoder.JsonObjectEncoder;
/**
* Decode an arbitrary split byte stream representing JSON objects to a byte stream

View File

@ -16,17 +16,18 @@
package org.springframework.reactive.codec.decoder;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import org.reactivestreams.Publisher;
import reactor.Publishers;
import reactor.io.buffer.Buffer;
import org.springframework.core.ResolvableType;
import org.springframework.http.MediaType;
import org.springframework.reactive.codec.encoder.StringEncoder;
import org.springframework.reactive.codec.support.HintUtils;
import reactor.Publishers;
import reactor.io.buffer.Buffer;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
/**
* Decode from a bytes stream to a String stream.

View File

@ -16,18 +16,19 @@
package org.springframework.reactive.codec.encoder;
import java.io.IOException;
import java.nio.ByteBuffer;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.reactivestreams.Publisher;
import reactor.Publishers;
import reactor.io.buffer.Buffer;
import org.springframework.core.ResolvableType;
import org.springframework.http.MediaType;
import org.springframework.reactive.codec.CodecException;
import org.springframework.reactive.codec.decoder.JacksonJsonDecoder;
import org.springframework.reactive.io.BufferOutputStream;
import reactor.Publishers;
import reactor.io.buffer.Buffer;
import java.io.IOException;
import java.nio.ByteBuffer;
/**
* Encode from an {@code Object} stream to a byte stream of JSON objects.

View File

@ -16,7 +16,19 @@
package org.springframework.reactive.codec.encoder;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.MarshalException;
import javax.xml.bind.Marshaller;
import org.reactivestreams.Publisher;
import reactor.Publishers;
import reactor.io.buffer.Buffer;
import org.springframework.core.ResolvableType;
import org.springframework.http.MediaType;
import org.springframework.reactive.codec.CodecException;
@ -24,17 +36,6 @@ import org.springframework.reactive.codec.decoder.Jaxb2Decoder;
import org.springframework.reactive.io.BufferOutputStream;
import org.springframework.util.Assert;
import org.springframework.util.ClassUtils;
import reactor.Publishers;
import reactor.io.buffer.Buffer;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.MarshalException;
import javax.xml.bind.Marshaller;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
/**
* Encode from an {@code Object} stream to a byte stream of XML elements.

View File

@ -16,23 +16,22 @@
package org.springframework.reactive.codec.encoder;
import org.reactivestreams.Publisher;
import org.reactivestreams.Subscriber;
import org.springframework.core.ResolvableType;
import org.springframework.http.MediaType;
import org.springframework.reactive.codec.decoder.JsonObjectDecoder;
import reactor.core.subscriber.SubscriberBarrier;
import java.nio.ByteBuffer;
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
import static reactor.Publishers.*;
import org.reactivestreams.Publisher;
import org.reactivestreams.Subscriber;
import reactor.core.subscriber.SubscriberBarrier;
import reactor.core.support.BackpressureUtils;
import reactor.io.buffer.Buffer;
import org.springframework.core.ResolvableType;
import org.springframework.http.MediaType;
import org.springframework.reactive.codec.decoder.JsonObjectDecoder;
import static reactor.Publishers.lift;
/**
* Encode a byte stream of individual JSON element to a byte stream representing a single
* JSON array when if it contains more than one element.

View File

@ -16,16 +16,17 @@
package org.springframework.reactive.codec.encoder;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import org.reactivestreams.Publisher;
import reactor.Publishers;
import org.springframework.core.ResolvableType;
import org.springframework.http.MediaType;
import org.springframework.reactive.codec.decoder.StringDecoder;
import org.springframework.reactive.codec.support.HintUtils;
import reactor.Publishers;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
/**
* Encode from a String stream to a bytes stream.

View File

@ -16,16 +16,17 @@
package org.springframework.reactive.io;
import org.reactivestreams.Publisher;
import org.reactivestreams.Subscription;
import org.springframework.util.Assert;
import reactor.Publishers;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.util.concurrent.BlockingQueue;
import org.reactivestreams.Publisher;
import org.reactivestreams.Subscription;
import reactor.Publishers;
import org.springframework.util.Assert;
/**
* {@code InputStream} implementation based on a byte array {@link Publisher}.
*

View File

@ -21,19 +21,8 @@ import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
import org.reactivestreams.Publisher;
import reactor.Publishers;
import reactor.core.publisher.convert.CompletableFutureConverter;
import reactor.core.publisher.convert.RxJava1Converter;
import reactor.core.publisher.convert.RxJava1SingleConverter;
import reactor.rx.Promise;
import reactor.rx.Stream;
import reactor.rx.Streams;
import rx.Observable;
import rx.Single;
import org.springframework.core.MethodParameter;
import org.springframework.core.ResolvableType;

View File

@ -22,10 +22,10 @@ import java.util.Arrays;
import java.util.List;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.reactive.codec.decoder.ByteBufferDecoder;
import org.springframework.reactive.codec.decoder.ByteToMessageDecoder;
import org.springframework.http.server.ReactiveServerHttpRequest;
import org.springframework.http.server.ReactiveServerHttpResponse;
import org.springframework.reactive.codec.decoder.ByteBufferDecoder;
import org.springframework.reactive.codec.decoder.ByteToMessageDecoder;
import org.springframework.reactive.codec.decoder.JacksonJsonDecoder;
import org.springframework.reactive.codec.decoder.JsonObjectDecoder;
import org.springframework.reactive.codec.decoder.StringDecoder;

View File

@ -16,22 +16,14 @@
package org.springframework.reactive.web.dispatch.method.annotation;
import java.lang.reflect.Type;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import org.reactivestreams.Publisher;
import reactor.Publishers;
import reactor.core.publisher.convert.CompletableFutureConverter;
import reactor.core.publisher.convert.RxJava1Converter;
import reactor.core.publisher.convert.RxJava1SingleConverter;
import reactor.rx.Promise;
import rx.Observable;
import rx.Single;
import org.springframework.core.MethodParameter;
import org.springframework.core.Ordered;

View File

@ -21,18 +21,6 @@ import reactor.io.buffer.Buffer;
import reactor.io.net.http.HttpChannel;
import reactor.rx.Stream;
import reactor.rx.Streams;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.ByteBuffer;
import org.reactivestreams.Publisher;
import reactor.io.buffer.Buffer;
import reactor.io.net.http.HttpChannel;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.server.ReactiveServerHttpRequest;
import org.springframework.util.Assert;
/**
* @author Stephane Maldini

View File

@ -20,7 +20,6 @@ import io.netty.buffer.ByteBuf;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.reactive.web.http.HttpServer;
import org.springframework.reactive.web.http.HttpServerSupport;
import org.springframework.reactive.web.http.rxnetty.RequestHandlerAdapter;
import org.springframework.util.Assert;

View File

@ -21,10 +21,6 @@ import java.nio.ByteBuffer;
import io.netty.handler.codec.http.HttpResponseStatus;
import io.reactivex.netty.protocol.http.server.HttpServerResponse;
import org.reactivestreams.Publisher;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.util.Assert;
import reactor.Publishers;
import reactor.core.publisher.convert.RxJava1Converter;
import reactor.io.buffer.Buffer;

View File

@ -18,7 +18,6 @@ package org.springframework.reactive.web.http.servlet;
import java.io.IOException;
import java.util.concurrent.atomic.AtomicInteger;
import javax.servlet.AsyncContext;
import javax.servlet.ServletInputStream;
import javax.servlet.ServletOutputStream;

View File

@ -17,7 +17,6 @@
package org.springframework.reactive.web.http.servlet;
import java.io.IOException;
import javax.servlet.AsyncContext;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;

View File

@ -18,9 +18,7 @@ package org.springframework.reactive.web.http.servlet;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.util.Arrays;
import javax.servlet.ReadListener;
import javax.servlet.ServletInputStream;