@ -32,20 +32,22 @@ public class ReactiveStreamsToCompletableFutureConverter implements GenericConve
@@ -32,20 +32,22 @@ public class ReactiveStreamsToCompletableFutureConverter implements GenericConve
@ -35,26 +35,30 @@ public final class ReactiveStreamsToReactorConverter implements GenericConverter
@@ -35,26 +35,30 @@ public final class ReactiveStreamsToReactorConverter implements GenericConverter
@ -36,28 +36,30 @@ public final class ReactiveStreamsToRxJava1Converter implements GenericConverter
@@ -36,28 +36,30 @@ public final class ReactiveStreamsToRxJava1Converter implements GenericConverter
@ -34,7 +34,9 @@ public class ByteBufferDecoder implements ByteToMessageDecoder<ByteBuffer> {
@@ -34,7 +34,9 @@ public class ByteBufferDecoder implements ByteToMessageDecoder<ByteBuffer> {
@ -40,6 +40,7 @@ public class JacksonJsonDecoder implements ByteToMessageDecoder<Object> {
@@ -40,6 +40,7 @@ public class JacksonJsonDecoder implements ByteToMessageDecoder<Object> {
privatefinalObjectMappermapper;
publicJacksonJsonDecoder(){
this(newObjectMapper());
}
@ -48,18 +49,22 @@ public class JacksonJsonDecoder implements ByteToMessageDecoder<Object> {
@@ -48,18 +49,22 @@ public class JacksonJsonDecoder implements ByteToMessageDecoder<Object> {
@ -77,7 +81,8 @@ public class Jaxb2Decoder implements ByteToMessageDecoder<Object> {
@@ -77,7 +81,8 @@ public class Jaxb2Decoder implements ByteToMessageDecoder<Object> {
newCodecException("Could not unmarshal to ["+outputClass+"]: "+ex.getMessage(),ex));
}
catch(JAXBExceptionex){
returnPublishers.error(newCodecException("Could not instantiate JAXBContext: "+ex.getMessage(),ex));
returnPublishers.error(newCodecException("Could not instantiate JAXBContext: "+
ex.getMessage(),ex));
}
}
@ -101,12 +106,11 @@ public class Jaxb2Decoder implements ByteToMessageDecoder<Object> {
@@ -101,12 +106,11 @@ public class Jaxb2Decoder implements ByteToMessageDecoder<Object> {
"Could not create Unmarshaller for class ["+clazz+"]: "+ex.getMessage(),ex);
thrownewCodecException("Could not create Unmarshaller for class "+
"["+clazz+"]: "+ex.getMessage(),ex);
}
}
@ -119,8 +123,8 @@ public class Jaxb2Decoder implements ByteToMessageDecoder<Object> {
@@ -119,8 +123,8 @@ public class Jaxb2Decoder implements ByteToMessageDecoder<Object> {
this.jaxbContexts.putIfAbsent(clazz,jaxbContext);
}
catch(JAXBExceptionex){
thrownewCodecException(
"Could not instantiate JAXBContext for class ["+clazz+"]: "+ex.getMessage(),ex);
thrownewCodecException("Could not instantiate JAXBContext for class "+
@ -66,14 +74,15 @@ public class JsonObjectDecoder implements ByteToMessageDecoder<ByteBuffer> {
@@ -66,14 +74,15 @@ public class JsonObjectDecoder implements ByteToMessageDecoder<ByteBuffer> {
@ -90,91 +99,89 @@ public class JsonObjectDecoder implements ByteToMessageDecoder<ByteBuffer> {
@@ -90,91 +99,89 @@ public class JsonObjectDecoder implements ByteToMessageDecoder<ByteBuffer> {
@ -185,74 +192,73 @@ public class JsonObjectDecoder implements ByteToMessageDecoder<ByteBuffer> {
@@ -185,74 +192,73 @@ public class JsonObjectDecoder implements ByteToMessageDecoder<ByteBuffer> {
elseif(c=='{'||c=='['){
initDecoding(c,streamArrayElements);
if(state==ST_DECODING_ARRAY_STREAM){
if(this.state==ST_DECODING_ARRAY_STREAM){
// Discard the array bracket
in.skipBytes(1);
this.input.skipBytes(1);
}
// Discard leading spaces in front of a JSON object/array.
}
elseif(Character.isWhitespace(c)){
in.skipBytes(1);
this.input.skipBytes(1);
}
else{
state=ST_CORRUPTED;
this.state=ST_CORRUPTED;
returnPublishers.error(newIllegalStateException(
"invalid JSON received at byte position "+idx+
": "+ByteBufUtil.hexDump(in)));
"invalid JSON received at byte position "+this.index+": "+
@ -47,7 +47,9 @@ public class StringDecoder implements ByteToMessageDecoder<String> {
@@ -47,7 +47,9 @@ public class StringDecoder implements ByteToMessageDecoder<String> {
@ -34,8 +34,11 @@ public class ByteBufferEncoder implements MessageToByteEncoder<ByteBuffer> {
@@ -34,8 +34,11 @@ public class ByteBufferEncoder implements MessageToByteEncoder<ByteBuffer> {
@ -54,7 +54,9 @@ public class JacksonJsonEncoder implements MessageToByteEncoder<Object> {
@@ -54,7 +54,9 @@ public class JacksonJsonEncoder implements MessageToByteEncoder<Object> {
@ -64,12 +68,12 @@ public class Jaxb2Encoder implements MessageToByteEncoder<Object> {
@@ -64,12 +68,12 @@ public class Jaxb2Encoder implements MessageToByteEncoder<Object> {
marshaller.marshal(value,outputStream);
buffer.flip();
returnbuffer.byteBuffer();
}catch(MarshalExceptionex){
thrownewCodecException(
"Could not marshal ["+value+"]: "+ex.getMessage(),ex);
}catch(JAXBExceptionex){
thrownewCodecException(
"Could not instantiate JAXBContext: "+ex.getMessage(),ex);
}
catch(MarshalExceptionex){
thrownewCodecException("Could not marshal ["+value+"]: "+ex.getMessage(),ex);
}
catch(JAXBExceptionex){
thrownewCodecException("Could not instantiate JAXBContext: "+ex.getMessage(),ex);
}
});
}
@ -77,12 +81,11 @@ public class Jaxb2Encoder implements MessageToByteEncoder<Object> {
@@ -77,12 +81,11 @@ public class Jaxb2Encoder implements MessageToByteEncoder<Object> {
"Could not create Marshaller for class ["+clazz+"]: "+ex.getMessage(),ex);
thrownewCodecException("Could not create Marshaller for class "+
"["+clazz+"]: "+ex.getMessage(),ex);
}
}
@ -95,8 +98,8 @@ public class Jaxb2Encoder implements MessageToByteEncoder<Object> {
@@ -95,8 +98,8 @@ public class Jaxb2Encoder implements MessageToByteEncoder<Object> {
this.jaxbContexts.putIfAbsent(clazz,jaxbContext);
}
catch(JAXBExceptionex){
thrownewCodecException(
"Could not instantiate JAXBContext for class ["+clazz+"]: "+ex.getMessage(),ex);
thrownewCodecException("Could not instantiate JAXBContext for class "+
@ -52,27 +52,36 @@ public class JsonObjectEncoder implements MessageToByteEncoder<ByteBuffer> {
@@ -52,27 +52,36 @@ public class JsonObjectEncoder implements MessageToByteEncoder<ByteBuffer> {
@ -86,17 +95,17 @@ public class JsonObjectEncoder implements MessageToByteEncoder<ByteBuffer> {
@@ -86,17 +95,17 @@ public class JsonObjectEncoder implements MessageToByteEncoder<ByteBuffer> {
@Override
protectedvoiddoNext(ByteBuffernext){
count++;
if(count==1){
prev=next;
this.count++;
if(this.count==1){
this.prev=next;
super.doRequest(1);
return;
}
ByteBuffertmp=prev;
prev=next;
ByteBuffertmp=this.prev;
this.prev=next;
Bufferbuffer=newBuffer();
if(count==2){
if(this.count==2){
buffer.append("[");
}
buffer.append(tmp);
@ -104,25 +113,25 @@ public class JsonObjectEncoder implements MessageToByteEncoder<ByteBuffer> {
@@ -104,25 +113,25 @@ public class JsonObjectEncoder implements MessageToByteEncoder<ByteBuffer> {
@ -46,7 +46,9 @@ public class StringEncoder implements MessageToByteEncoder<String> {
@@ -46,7 +46,9 @@ public class StringEncoder implements MessageToByteEncoder<String> {
@ -130,7 +130,8 @@ public class ByteBufferPublisherInputStream extends InputStream {
@@ -130,7 +130,8 @@ public class ByteBufferPublisherInputStream extends InputStream {
@ -34,6 +34,11 @@ public class SimpleHandlerResultHandler implements Ordered, HandlerResultHandler
@@ -34,6 +34,11 @@ public class SimpleHandlerResultHandler implements Ordered, HandlerResultHandler
privateintorder=Ordered.LOWEST_PRECEDENCE;
publicvoidsetOrder(intorder){
this.order=order;
}
@Override
publicintgetOrder(){
returnthis.order;
@ -46,8 +51,10 @@ public class SimpleHandlerResultHandler implements Ordered, HandlerResultHandler
@@ -46,8 +51,10 @@ public class SimpleHandlerResultHandler implements Ordered, HandlerResultHandler
@ -64,7 +64,8 @@ public class InvocableHandlerMethod extends HandlerMethod {
@@ -64,7 +64,8 @@ public class InvocableHandlerMethod extends HandlerMethod {
@ -76,7 +77,8 @@ public class InvocableHandlerMethod extends HandlerMethod {
@@ -76,7 +77,8 @@ public class InvocableHandlerMethod extends HandlerMethod {
try{
returnValue=doInvoke(args);
if(logger.isTraceEnabled()){
logger.trace("Method ["+getMethod().getName()+"] returned ["+returnValue+"]");
logger.trace("Method ["+getMethod().getName()+"] returned "+
@ -43,24 +43,29 @@ public class RequestBodyArgumentResolver implements HandlerMethodArgumentResolve
@@ -43,24 +43,29 @@ public class RequestBodyArgumentResolver implements HandlerMethodArgumentResolve
@ -75,14 +80,15 @@ public class RequestBodyArgumentResolver implements HandlerMethodArgumentResolve
@@ -75,14 +80,15 @@ public class RequestBodyArgumentResolver implements HandlerMethodArgumentResolve
@ -97,7 +103,9 @@ public class RequestBodyArgumentResolver implements HandlerMethodArgumentResolve
@@ -97,7 +103,9 @@ public class RequestBodyArgumentResolver implements HandlerMethodArgumentResolve
@ -106,7 +114,10 @@ public class RequestBodyArgumentResolver implements HandlerMethodArgumentResolve
@@ -106,7 +114,10 @@ public class RequestBodyArgumentResolver implements HandlerMethodArgumentResolve
@ -115,4 +126,5 @@ public class RequestBodyArgumentResolver implements HandlerMethodArgumentResolve
@@ -115,4 +126,5 @@ public class RequestBodyArgumentResolver implements HandlerMethodArgumentResolve
@ -57,12 +58,16 @@ public class RequestMappingHandlerAdapter implements HandlerAdapter, Initializin
@@ -57,12 +58,16 @@ public class RequestMappingHandlerAdapter implements HandlerAdapter, Initializin
@ -94,13 +94,12 @@ public class RequestMappingHandlerMapping implements HandlerMapping,
@@ -94,13 +94,12 @@ public class RequestMappingHandlerMapping implements HandlerMapping,
logger.debug("Mapped "+method+" "+path+" to ["+entry.getValue()+"]");
logger.debug("Mapped "+request.getMethod()+" "+
request.getURI().getPath()+" to ["+entry.getValue()+"]");
}
returnentry.getValue();
}
@ -120,6 +119,11 @@ public class RequestMappingHandlerMapping implements HandlerMapping,
@@ -120,6 +119,11 @@ public class RequestMappingHandlerMapping implements HandlerMapping,
@ -127,20 +131,22 @@ public class RequestMappingHandlerMapping implements HandlerMapping,
@@ -127,20 +131,22 @@ public class RequestMappingHandlerMapping implements HandlerMapping,
@ -61,21 +62,26 @@ public class ResponseBodyResultHandler implements HandlerResultHandler, Ordered
@@ -61,21 +62,26 @@ public class ResponseBodyResultHandler implements HandlerResultHandler, Ordered
@ -90,8 +96,8 @@ public class ResponseBodyResultHandler implements HandlerResultHandler, Ordered
@@ -90,8 +96,8 @@ public class ResponseBodyResultHandler implements HandlerResultHandler, Ordered
@ -99,8 +105,7 @@ public class ResponseBodyResultHandler implements HandlerResultHandler, Ordered
@@ -99,8 +105,7 @@ public class ResponseBodyResultHandler implements HandlerResultHandler, Ordered
@ -125,19 +130,22 @@ public class ResponseBodyResultHandler implements HandlerResultHandler, Ordered
@@ -125,19 +130,22 @@ public class ResponseBodyResultHandler implements HandlerResultHandler, Ordered
@ -147,7 +155,9 @@ public class ResponseBodyResultHandler implements HandlerResultHandler, Ordered
@@ -147,7 +155,9 @@ public class ResponseBodyResultHandler implements HandlerResultHandler, Ordered
@ -156,7 +166,10 @@ public class ResponseBodyResultHandler implements HandlerResultHandler, Ordered
@@ -156,7 +166,10 @@ public class ResponseBodyResultHandler implements HandlerResultHandler, Ordered
@ -71,10 +71,11 @@ public class RxNettyServerHttpResponse implements ReactiveServerHttpResponse {
@@ -71,10 +71,11 @@ public class RxNettyServerHttpResponse implements ReactiveServerHttpResponse {
@ -46,7 +46,9 @@ public class ServletServerHttpRequest implements ReactiveServerHttpRequest {
@@ -46,7 +46,9 @@ public class ServletServerHttpRequest implements ReactiveServerHttpRequest {
Assert.notNull(servletRequest,"HttpServletRequest must not be null");
this.servletRequest=servletRequest;
this.requestBodyPublisher=requestBodyPublisher;
@ -74,8 +76,8 @@ public class ServletServerHttpRequest implements ReactiveServerHttpRequest {
@@ -74,8 +76,8 @@ public class ServletServerHttpRequest implements ReactiveServerHttpRequest {
Assert.notNull(response,"'response' must not be null");
Assert.notNull(subscriber,"'subscriber' must not be null");
this.response=response;
this.subscriber=subscriber;
this.headers=newHttpHeaders();
}
@Override
publicvoidsetStatusCode(HttpStatusstatus){
this.servletResponse.setStatus(status.value());
this.response.setStatus(status.value());
}
@Override
@ -71,7 +75,7 @@ public class ServletServerHttpResponse implements ReactiveServerHttpResponse {
@@ -71,7 +75,7 @@ public class ServletServerHttpResponse implements ReactiveServerHttpResponse {
@ -79,16 +83,16 @@ public class ServletServerHttpResponse implements ReactiveServerHttpResponse {
@@ -79,16 +83,16 @@ public class ServletServerHttpResponse implements ReactiveServerHttpResponse {
@ -69,6 +70,7 @@ public class RequestMappingIntegrationTests extends AbstractHttpHandlerIntegrati
@@ -69,6 +70,7 @@ public class RequestMappingIntegrationTests extends AbstractHttpHandlerIntegrati
privateTestControllercontroller;
@Override
protectedHttpHandlercreateHttpHandler(){
@ -76,9 +78,9 @@ public class RequestMappingIntegrationTests extends AbstractHttpHandlerIntegrati
@@ -76,9 +78,9 @@ public class RequestMappingIntegrationTests extends AbstractHttpHandlerIntegrati
@ -197,16 +199,16 @@ public class RequestMappingIntegrationTests extends AbstractHttpHandlerIntegrati
@@ -197,16 +199,16 @@ public class RequestMappingIntegrationTests extends AbstractHttpHandlerIntegrati
@ -216,9 +218,9 @@ public class RequestMappingIntegrationTests extends AbstractHttpHandlerIntegrati
@@ -216,9 +218,9 @@ public class RequestMappingIntegrationTests extends AbstractHttpHandlerIntegrati
@ -226,10 +228,9 @@ public class RequestMappingIntegrationTests extends AbstractHttpHandlerIntegrati
@@ -226,10 +228,9 @@ public class RequestMappingIntegrationTests extends AbstractHttpHandlerIntegrati
@ -237,10 +238,11 @@ public class RequestMappingIntegrationTests extends AbstractHttpHandlerIntegrati
@@ -237,10 +238,11 @@ public class RequestMappingIntegrationTests extends AbstractHttpHandlerIntegrati
@ -250,10 +252,7 @@ public class RequestMappingIntegrationTests extends AbstractHttpHandlerIntegrati
@@ -250,10 +252,7 @@ public class RequestMappingIntegrationTests extends AbstractHttpHandlerIntegrati
@ -265,15 +264,12 @@ public class RequestMappingIntegrationTests extends AbstractHttpHandlerIntegrati
@@ -265,15 +264,12 @@ public class RequestMappingIntegrationTests extends AbstractHttpHandlerIntegrati
@ -309,7 +305,8 @@ public class RequestMappingIntegrationTests extends AbstractHttpHandlerIntegrati
@@ -309,7 +305,8 @@ public class RequestMappingIntegrationTests extends AbstractHttpHandlerIntegrati
@ -390,7 +387,9 @@ public class RequestMappingIntegrationTests extends AbstractHttpHandlerIntegrati
@@ -390,7 +387,9 @@ public class RequestMappingIntegrationTests extends AbstractHttpHandlerIntegrati
@ -417,7 +416,7 @@ public class RequestMappingIntegrationTests extends AbstractHttpHandlerIntegrati
@@ -417,7 +416,7 @@ public class RequestMappingIntegrationTests extends AbstractHttpHandlerIntegrati