This is an automated email from the ASF dual-hosted git repository.

pjfanning pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/poi.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 0d6d4872c4 issue-70159: cache that format is not a datetime format 
string (#1188)
0d6d4872c4 is described below

commit 0d6d4872c491b1f230f51c6878e57407c60ae697
Author: PJ Fanning <[email protected]>
AuthorDate: Mon Jul 20 22:56:33 2026 +0100

    issue-70159: cache that format is not a datetime format string (#1188)
---
 poi/src/main/java/org/apache/poi/ss/usermodel/DateUtil.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/poi/src/main/java/org/apache/poi/ss/usermodel/DateUtil.java 
b/poi/src/main/java/org/apache/poi/ss/usermodel/DateUtil.java
index ea7deab17e..530b960c96 100644
--- a/poi/src/main/java/org/apache/poi/ss/usermodel/DateUtil.java
+++ b/poi/src/main/java/org/apache/poi/ss/usermodel/DateUtil.java
@@ -709,7 +709,8 @@ public class DateUtil {
         // Ensure it has some date letters in it
         // (Avoids false positives on the rest of pattern 3)
         if (! date_ptrn3a.matcher(fs).find()) {
-           return false;
+            cache(formatString, formatIndex, false);
+            return false;
         }
 
         // If we get here, check it's only made up, in any case, of:


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

Reply via email to