This is an automated email from the ASF dual-hosted git repository. rcordier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 008923d001157789aaadea7b8fae99cac67adec5 Author: Benoit TELLIER <[email protected]> AuthorDate: Tue Mar 5 09:27:34 2024 +0100 [ENHANCEMENT] JsoupHtmlTextExtractor: The use of concurrent structures is not needed --- .../org/apache/james/jmap/draft/utils/JsoupHtmlTextExtractor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/draft/utils/JsoupHtmlTextExtractor.java b/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/draft/utils/JsoupHtmlTextExtractor.java index 41fbe88b65..f47b0b281f 100644 --- a/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/draft/utils/JsoupHtmlTextExtractor.java +++ b/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/draft/utils/JsoupHtmlTextExtractor.java @@ -19,9 +19,9 @@ package org.apache.james.jmap.draft.utils; +import java.util.ArrayDeque; import java.util.Deque; import java.util.Optional; -import java.util.concurrent.ConcurrentLinkedDeque; import java.util.function.Predicate; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -114,9 +114,9 @@ public class JsoupHtmlTextExtractor implements HtmlTextExtractor { } Stream<HTMLNode> flatten(Node base) { - Deque<HTMLNode> in = new ConcurrentLinkedDeque<>(); + Deque<HTMLNode> in = new ArrayDeque<>(); in.addFirst(new HTMLNode(base, JsoupHtmlTextExtractor.INITIAL_LIST_NESTED_LEVEL)); - Deque<HTMLNode> out = new ConcurrentLinkedDeque<>(); + Deque<HTMLNode> out = new ArrayDeque<>(); while (!in.isEmpty()) { HTMLNode node = in.removeFirst(); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
