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 2012/11/14 10:56:05 UTC
svn commit: r1409128 -
/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java
Author: davsclaus
Date: Wed Nov 14 09:56:04 2012
New Revision: 1409128
URL: http://svn.apache.org/viewvc?rev=1409128&view=rev
Log:
CAMEL-1069: Added support for searchTerm on camel-mail. Ticket was only 4 years old ;)
Modified:
camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java
Modified: camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java?rev=1409128&r1=1409127&r2=1409128&view=diff
==============================================================================
--- camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java (original)
+++ camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java Wed Nov 14 09:56:04 2012
@@ -31,11 +31,9 @@ import javax.mail.internet.MimeMultipart
import javax.mail.search.SearchTerm;
import org.apache.camel.Converter;
-import org.apache.camel.Exchange;
import org.apache.camel.NoTypeConversionAvailableException;
import org.apache.camel.TypeConverter;
import org.apache.camel.converter.IOConverter;
-import org.apache.camel.spi.TypeConverterRegistry;
/**
* JavaMail specific converters.
@@ -98,7 +96,7 @@ public final class MailConverters {
}
/**
- * Converts the given JavaMail multipart to a InputStream body, where the contenttype of the multipart
+ * Converts the given JavaMail multipart to a InputStream body, where the content-type of the multipart
* must be text based (ie start with text). Can return null.
*/
@Converter
@@ -110,11 +108,6 @@ public final class MailConverters {
return IOConverter.toInputStream(s, null);
}
- @Converter
- public static SearchTerm toSearchTerm(SimpleSearchTerm simple, Exchange exchange) throws ParseException, NoTypeConversionAvailableException {
- return toSearchTerm(simple, exchange != null ? exchange.getContext().getTypeConverter() : null);
- }
-
public static SearchTerm toSearchTerm(SimpleSearchTerm simple, TypeConverter typeConverter) throws ParseException, NoTypeConversionAvailableException {
SearchTermBuilder builder = new SearchTermBuilder();
if (simple.isUnseen()) {