INT-1471, more polishing, general cleanup

This commit is contained in:
Oleg Zhurakousky
2010-10-28 09:24:38 -04:00
parent c64c25ffa0
commit 0ccc671a3c
2 changed files with 3 additions and 2 deletions

View File

@@ -23,9 +23,10 @@ import twitter4j.Twitter;
/**
* The adapters that support 'sending' / 'updating status' messages will do so on top of this implementation for convenience, only.
* Base adapter class for all outbound Twitter adapters
*
* @author Josh Long
* @since 2.0
*/
public abstract class AbstractOutboundTwitterEndpointSupport extends AbstractMessageHandler {
protected volatile OAuthConfiguration configuration;

View File

@@ -39,7 +39,7 @@ public class OutboundDirectMessageMessageHandler extends AbstractOutboundTwitter
}
try {
Assert.isInstanceOf(String.class, message.getPayload(), "Only payload of type String is supported. If your payload " +
"is not of type String you may want to introduce transformer");
"is not of type String consider adding a transformer to the message flow in front of this adapter.");
Assert.isTrue(message.getHeaders().containsKey(TwitterHeaders.DM_TARGET_USER_ID),
"the '" + TwitterHeaders.DM_TARGET_USER_ID + "' header is required");
Object toUser = message.getHeaders().get(TwitterHeaders.DM_TARGET_USER_ID);