[ 
https://issues.apache.org/jira/browse/CAMEL-7254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13914957#comment-13914957
 ] 

ASF GitHub Bot commented on CAMEL-7254:
---------------------------------------

GitHub user davidkarlsen opened a pull request:

    https://github.com/apache/camel/pull/103

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

    Signed-off-by: david <[email protected]>

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/davidkarlsen/camel CAMEL-7254

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/103.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #103
    
----
commit 8af0b6069c414e8c46fb9843d99374d63c7c9581
Author: david <[email protected]>
Date:   2014-02-27T19:38:45Z

    CAMEL-7254: Fix IMAP peeking, use simpleName() for classcheck
    
    Signed-off-by: david <[email protected]>

----


> MailComponent 'peek' doesn't work due to programming error
> ----------------------------------------------------------
>
>                 Key: CAMEL-7254
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7254
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-mail
>    Affects Versions: 2.12.2
>            Reporter: Matt Nathan
>            Priority: Critical
>
> The MailComponent peek setting doesn't work due to the following line:
> {code:java}
>     private void peekMessage(Message mail) {
>         // this only applies to IMAP messages which has a setPeek method
>         if (mail.getClass().getName().startsWith("IMAP")) {
>             try {
>                 LOG.trace("Calling setPeek(true) on mail message {}", mail);
>                 IntrospectionSupport.setProperty(mail, "peek", true);
>             } catch (Throwable e) {
>                 // ignore
>                 LOG.trace("Error setting peak property to true on: " + mail + 
> ". This exception is ignored.", e);
>             }
>         }
>     }
> {code}
> The line that checks the class name for IMAP should be using getSimpleName. 
> Otherwise it's checking the package name instead.
> This effectively means that rollback of processing in camel mail is not 
> supported.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to