You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2014/02/28 03:43:43 UTC

[3/3] git commit: CAMEL-7254: Fix IMAP peeking, use simpleName() for classcheck

CAMEL-7254: Fix IMAP peeking, use simpleName() for classcheck

Signed-off-by: david <da...@davidkarlsen.com>


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

Branch: refs/heads/camel-2.11.x
Commit: 8dfae9209bccf013ca7c7c4570d39ff645af8aa3
Parents: 839b17e
Author: david <da...@davidkarlsen.com>
Authored: Thu Feb 27 20:38:45 2014 +0100
Committer: Willem Jiang <wi...@gmail.com>
Committed: Fri Feb 28 10:43:15 2014 +0800

----------------------------------------------------------------------
 .../main/java/org/apache/camel/component/mail/MailConsumer.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/8dfae920/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java
index 5bbba45..64e4a56 100644
--- a/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java
+++ b/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java
@@ -218,7 +218,7 @@ public class MailConsumer extends ScheduledBatchPollingConsumer {
 
     private void peekMessage(Message mail) {
         // this only applies to IMAP messages which has a setPeek method
-        if (mail.getClass().getName().startsWith("IMAP")) {
+        if (mail.getClass().getSimpleName().startsWith("IMAP")) {
             try {
                 LOG.trace("Calling setPeek(true) on mail message {}", mail);
                 IntrospectionSupport.setProperty(mail, "peek", true);