You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2020/05/20 11:00:36 UTC
[james-project] 10/11: Revert "[REFACTORING] MDN parboiled parser
can be a constant"
This is an automated email from the ASF dual-hosted git repository.
btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 41d0a69ca53a60986b0d1bfcbfe885d8fffcb0fb
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Wed May 20 08:54:31 2020 +0700
Revert "[REFACTORING] MDN parboiled parser can be a constant"
This reverts commit d429f252df223ad6008cef3969a0ccd7c61bf857.
---
mdn/src/main/java/org/apache/james/mdn/MDNReportParser.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/mdn/src/main/java/org/apache/james/mdn/MDNReportParser.java b/mdn/src/main/java/org/apache/james/mdn/MDNReportParser.java
index 3c2e8a6..a1dc416 100644
--- a/mdn/src/main/java/org/apache/james/mdn/MDNReportParser.java
+++ b/mdn/src/main/java/org/apache/james/mdn/MDNReportParser.java
@@ -46,8 +46,6 @@ import org.parboiled.support.ParsingResult;
import com.google.common.annotations.VisibleForTesting;
public class MDNReportParser {
- private static final Parser PARSER = Parboiled.createParser(Parser.class);
-
public MDNReportParser() {
}
@@ -56,8 +54,8 @@ public class MDNReportParser {
}
public Optional<MDNReport> parse(String mdnReport) {
- ParsingResult<Object> result = new ReportingParseRunner<>(PARSER.dispositionNotificationContent())
- .run(mdnReport);
+ Parser parser = Parboiled.createParser(MDNReportParser.Parser.class);
+ ParsingResult<Object> result = new ReportingParseRunner<>(parser.dispositionNotificationContent()).run(mdnReport);
if (result.matched) {
return Optional.of((MDNReport)result.resultValue);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org