You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/04/13 12:34:07 UTC

camel git commit: camel-twitter: removed the truncation

Repository: camel
Updated Branches:
  refs/heads/master 242533de5 -> 5f7cf6271


camel-twitter: removed the truncation

Twitter status updates were truncated to 160 chars if they were longer.
However the twitter limit is 140 chars, so this truncation didn't have
any effect and I removed it.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5f7cf627
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5f7cf627
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5f7cf627

Branch: refs/heads/master
Commit: 5f7cf6271bd7d523d902c5761ecaa6a4e51612f9
Parents: 242533d
Author: Martin Scharm <ma...@binfalse.de>
Authored: Sun Apr 10 10:36:52 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Apr 13 12:32:44 2016 +0200

----------------------------------------------------------------------
 .../apache/camel/component/twitter/producer/UserProducer.java   | 5 -----
 1 file changed, 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/5f7cf627/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/producer/UserProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/producer/UserProducer.java b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/producer/UserProducer.java
index 7e809dd..2967738 100644
--- a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/producer/UserProducer.java
+++ b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/producer/UserProducer.java
@@ -63,11 +63,6 @@ public class UserProducer extends TwitterProducer {
     }
 
     private Status updateStatus(String status) throws Exception {
-        if (status.length() > 160) {
-            log.warn("Message is longer than 160 characters. Message will be truncated!");
-            status = status.substring(0, 160);
-        }
-
         Status response = endpoint.getProperties().getTwitter().updateStatus(status);
         log.debug("Updated status: {}", status);
         log.debug("Status id: {}", response.getId());