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

garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git


The following commit(s) were added to refs/heads/master by this push:
     new a2c5760fb Bump Apache Commons Parent from 105 to 106 (#1823)
a2c5760fb is described below

commit a2c5760fbe545ffcf3046a87abc41ab2d70bfda1
Author: Gary Gregory <[email protected]>
AuthorDate: Sat Oct 17 14:57:10 2026 -0400

    Bump Apache Commons Parent from 105 to 106 (#1823)
    
    * Bump Apache Commons Parent from 105 to 106
    
    * Suppress false-positive SpotBugs warnings in FastDateParser
    
    StrategyParser is created locally within init(Calendar), consumed
    synchronously, and never escapes that invocation. Its currentIdx field
    is therefore confined to the initializing thread, including when init()
    is called during deserialization.
    
    Add a SpotBugs exclusion restricted to StrategyParser.currentIdx for
    AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE and
    AT_STALE_THREAD_WRITE_OF_PRIMITIVE. This addresses all three reported
    warnings without changing runtime behavior or adding unnecessary
    synchronization.
    
    Document the helper's confinement in its class Javadoc to explain why
    the mutable cursor requires no cross-thread coordination.
---
 pom.xml                                                         | 2 +-
 src/conf/spotbugs-exclude-filter.xml                            | 6 ++++++
 src/main/java/org/apache/commons/lang3/time/FastDateParser.java | 6 +++++-
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index c0252c2df..0a775d1af 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.commons</groupId>
     <artifactId>commons-parent</artifactId>
-    <version>105</version>
+    <version>106</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>commons-lang3</artifactId>
diff --git a/src/conf/spotbugs-exclude-filter.xml 
b/src/conf/spotbugs-exclude-filter.xml
index a07ceb9e9..613ef7364 100644
--- a/src/conf/spotbugs-exclude-filter.xml
+++ b/src/conf/spotbugs-exclude-filter.xml
@@ -237,4 +237,10 @@
   <Match>
     <Bug pattern="SING_SINGLETON_IMPLEMENTS_SERIALIZABLE" />
   </Match>
+  <!-- StrategyParser is confined to a single init() invocation and never 
escapes. -->
+  <Match>
+    <Class name="org.apache.commons.lang3.time.FastDateParser$StrategyParser" 
/>
+    <Field name="currentIdx" />
+    <Bug 
pattern="AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE,AT_STALE_THREAD_WRITE_OF_PRIMITIVE"
 />
+  </Match>
 </FindBugsFilter>
diff --git a/src/main/java/org/apache/commons/lang3/time/FastDateParser.java 
b/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
index 7b632083e..adcfab611 100644
--- a/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
+++ b/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
@@ -448,7 +448,11 @@ public String toString() {
     }
 
     /**
-     * Parse format into Strategies
+     * Parses the format into strategies.
+     *
+     * <p>
+     * Instances are confined to a single {@link #init(Calendar)} invocation 
and never escape that invocation.
+     * </p>
      */
     private final class StrategyParser {
         private final Calendar definingCalendar;

Reply via email to