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-mime4j.git


The following commit(s) were added to refs/heads/master by this push:
     new 8591c45  MIME-298 DateTimeFieldLenientImpl: remove unneeded option
8591c45 is described below

commit 8591c45571723ae3b336cad1532c548b2807d292
Author: Benoit Tellier <[email protected]>
AuthorDate: Sun Jun 20 10:29:17 2021 +0700

    MIME-298 DateTimeFieldLenientImpl: remove unneeded option
    
    Removing it breaks no tests, as 0000 is the
    default GMT.
    
    This prevents one defensive copy of the
    parsed entity thus gets parsing slightly
    faster.
---
 .../org/apache/james/mime4j/field/DateTimeFieldLenientImpl.java     | 6 ------
 1 file changed, 6 deletions(-)

diff --git 
a/dom/src/main/java/org/apache/james/mime4j/field/DateTimeFieldLenientImpl.java 
b/dom/src/main/java/org/apache/james/mime4j/field/DateTimeFieldLenientImpl.java
index 43e7949..c29e67e 100644
--- 
a/dom/src/main/java/org/apache/james/mime4j/field/DateTimeFieldLenientImpl.java
+++ 
b/dom/src/main/java/org/apache/james/mime4j/field/DateTimeFieldLenientImpl.java
@@ -36,8 +36,6 @@ import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeFormatterBuilder;
 import java.time.format.ResolverStyle;
 import java.time.format.SignStyle;
-import java.time.temporal.ChronoField;
-import java.time.temporal.TemporalField;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Locale;
@@ -85,10 +83,6 @@ public class DateTimeFieldLenientImpl extends AbstractField 
implements DateTimeF
             .appendLiteral(' ')
             .appendOffsetId()
         .optionalEnd()
-        .optionalStart()
-            .appendLiteral(' ')
-            .appendPattern("0000")
-        .optionalEnd()
         .toFormatter()
         .withZone(ZoneId.of("GMT"))
         .withResolverStyle(ResolverStyle.LENIENT)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to