chibenwa commented on code in PR #902:
URL: https://github.com/apache/james-project/pull/902#discussion_r868906129
##########
mailbox/api/src/main/java/org/apache/james/mailbox/extractor/TextExtractor.java:
##########
@@ -23,8 +23,14 @@
import org.apache.james.mailbox.model.ContentType;
+import reactor.core.publisher.Mono;
+
public interface TextExtractor {
ParsedContent extractContent(InputStream inputStream, ContentType
contentType) throws Exception;
+ default Mono<ParsedContent> extractContentReactive(InputStream
inputStream, ContentType contentType) {
+ return Mono.fromCallable(() -> extractContent(inputStream,
contentType));
Review Comment:
Good question. In practice this is, with current implementation, a byte
array input stream. But yes I will put that subscribeOn for the sake of
genericity or we might regret it later.
Good catch!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]