Remove TODOs (replaced with JIRA tickets)

Issue: SPR-10703
This commit is contained in:
Rossen Stoyanchev
2013-09-03 23:28:21 -04:00
parent 8a4c6eb605
commit 1c47c8f35c
13 changed files with 9 additions and 41 deletions

View File

@@ -42,11 +42,4 @@ public interface MessageHandler {
*/
void handleMessage(Message<?> message) throws MessagingException;
/*
* TODO: exceptions
* @throws org.springframework.integration.MessageRejectedException if the handler doesn't accept the message
* @throws org.springframework.integration.MessageHandlingException when something fails during the handling
* @throws org.springframework.integration.MessageDeliveryException when this handler failed to deliver the
*/
}

View File

@@ -25,7 +25,7 @@ import org.springframework.util.Assert;
/**
* TODO
* A resolver for extracting the body of a message.
*
* <p>This {@link HandlerMethodArgumentResolver} should be ordered last as it supports all
* types and does not require the {@link MessageBody} annotation.
@@ -62,7 +62,6 @@ public class MessageBodyMethodArgumentResolver implements HandlerMethodArgumentR
return message.getPayload();
}
else {
// TODO: use content-type header
return this.converter.fromMessage(message, targetClass);
}
}

View File

@@ -94,7 +94,7 @@ public class InvocableHandlerMethod extends HandlerMethod {
}
/**
* TODO
* Invoke the method with the given message.
*
* @exception Exception raised if no suitable argument resolver can be found, or the
* method raised an exception

View File

@@ -339,8 +339,7 @@ public class AnnotationMethodMessageHandler implements MessageHandler, Applicati
invokeExceptionHandler(message, handlerMethod, ex);
}
catch (Throwable ex) {
// TODO
ex.printStackTrace();
logger.error("Error while processing message " + message, ex);
}
}

View File

@@ -255,7 +255,6 @@ public class StompHeaderAccessor extends SimpMessageHeaderAccessor {
return null;
}
String[] rawValues = StringUtils.commaDelimitedListToStringArray(rawValue);
// TODO assertions
return new long[] { Long.valueOf(rawValues[0]), Long.valueOf(rawValues[1])};
}

View File

@@ -73,7 +73,6 @@ public class StompMessageConverter {
String headerContent = new String(byteContent, 0, payloadIndex, STOMP_CHARSET);
Parser parser = new Parser(headerContent);
// TODO: validate command and whether a payload is allowed
StompCommand command = StompCommand.valueOf(parser.nextToken(LF).trim());
Assert.notNull(command, "No command found");

View File

@@ -99,9 +99,6 @@ public class StompProtocolHandler implements SubProtocolHandler {
String payload = ((TextMessage)webSocketMessage).getPayload();
Message<?> message = this.stompMessageConverter.toMessage(payload);
// TODO: validate size limits
// http://stomp.github.io/stomp-specification-1.2.html#Size_Limits
if (logger.isTraceEnabled()) {
logger.trace("Message " + message);
}
@@ -124,10 +121,6 @@ public class StompProtocolHandler implements SubProtocolHandler {
logger.error("Terminating STOMP session due to failure to send message: ", t);
sendErrorMessage(session, t);
}
// TODO: send RECEIPT message if incoming message has "receipt" header
// http://stomp.github.io/stomp-specification-1.2.html#Header_receipt
}
catch (Throwable error) {
sendErrorMessage(session, error);
@@ -149,13 +142,11 @@ public class StompProtocolHandler implements SubProtocolHandler {
}
if (StompCommand.MESSAGE.equals(headers.getCommand()) && (headers.getSubscriptionId() == null)) {
// TODO: failed message delivery mechanism
logger.error("Ignoring message, no subscriptionId header: " + message);
return;
}
if (!(message.getPayload() instanceof byte[])) {
// TODO: failed message delivery mechanism
logger.error("Ignoring message, expected byte[] content: " + message);
return;
}
@@ -197,7 +188,7 @@ public class StompProtocolHandler implements SubProtocolHandler {
else {
throw new StompConversionException("Unsupported version '" + acceptVersions + "'");
}
connectedHeaders.setHeartbeat(0,0); // TODO
connectedHeaders.setHeartbeat(0,0);
Principal principal = session.getPrincipal();
if (principal != null) {
@@ -210,8 +201,6 @@ public class StompProtocolHandler implements SubProtocolHandler {
}
}
// TODO: security
Message<?> connectedMessage = MessageBuilder.withPayloadAndHeaders(new byte[0], connectedHeaders).build();
byte[] bytes = this.stompMessageConverter.fromMessage(connectedMessage);
session.sendMessage(new TextMessage(new String(bytes, Charset.forName("UTF-8"))));