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

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

commit a93ab1c9da20236c3d34725ce568713f6abc034a
Author: Gary D. Gregory <garydgreg...@gmail.com>
AuthorDate: Thu May 1 00:30:27 2025 -0400

    Shared primitive variable "forceSingleLine" in one thread may not yield
    the value of the most recent write from another thread
    [org.apache.commons.configuration2.PropertiesConfigurationLayout] At
    PropertiesConfigurationLayout.java:[line 821]
    AT_STALE_THREAD_WRITE_OF_PRIMITIVE
---
 src/changes/changes.xml                                                 | 1 +
 .../apache/commons/configuration2/PropertiesConfigurationLayout.java    | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index b3796169..b993ca0b 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -26,6 +26,7 @@
     <release version="2.12.1" date="YYYY-MM-DD" description="Minor release 
with new features and updated dependencies; requires Java 8 or above.">
        <!-- FIX -->
        <action type="fix" dev="ggregory" due-to="Gary Gregory, 
SpotBugs">Shared primitive variable "throwExceptionOnMissing" in one thread may 
not yield the value of the most recent write from another thread 
[org.apache.commons.configuration2.AbstractConfiguration] At 
AbstractConfiguration.java:[line 1493] 
AT_STALE_THREAD_WRITE_OF_PRIMITIVE.</action>
+       <action type="fix" dev="ggregory" due-to="Gary Gregory, 
SpotBugs">Shared primitive variable "forceSingleLine" in one thread may not 
yield the value of the most recent write from another thread 
[org.apache.commons.configuration2.PropertiesConfigurationLayout] At 
PropertiesConfigurationLayout.java:[line 821] 
AT_STALE_THREAD_WRITE_OF_PRIMITIVE.</action>
        <!-- ADD -->
        <!-- UPDATE -->
        <action type="update" dev="ggregory" due-to="Gary Gregory, 
Dependabot">Bump com.fasterxml.jackson.core:jackson-databind from 2.18.3 to 
2.19.0 #565.</action>
diff --git 
a/src/main/java/org/apache/commons/configuration2/PropertiesConfigurationLayout.java
 
b/src/main/java/org/apache/commons/configuration2/PropertiesConfigurationLayout.java
index 806eb702..289d9969 100644
--- 
a/src/main/java/org/apache/commons/configuration2/PropertiesConfigurationLayout.java
+++ 
b/src/main/java/org/apache/commons/configuration2/PropertiesConfigurationLayout.java
@@ -380,7 +380,7 @@ public class PropertiesConfigurationLayout implements 
EventListener<Configuratio
     private final AtomicInteger loadCounter;
 
     /** Stores the force single line flag. */
-    private boolean forceSingleLine;
+    private volatile boolean forceSingleLine;
 
     /** Seen includes. */
     private final ArrayDeque<URL> seenStack = new ArrayDeque<>();

Reply via email to