Skip to content

Commit 3312ad7

Browse files
committed
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
1 parent 1e6d73a commit 3312ad7

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/changes/changes.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<body>
2626
<release version="2.12.1" date="YYYY-MM-DD" description="Minor release with new features and updated dependencies; requires Java 8 or above.">
2727
<!-- FIX -->
28+
<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>
2829
<!-- ADD -->
2930
<!-- UPDATE -->
3031
<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>

src/main/java/org/apache/commons/configuration2/AbstractConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ private static void throwMissingPropertyException(final String key) {
190190
* Whether the configuration should throw NoSuchElementExceptions or simply return null when a property does not exist.
191191
* Defaults to return null.
192192
*/
193-
private boolean throwExceptionOnMissing;
193+
private volatile boolean throwExceptionOnMissing;
194194

195195
/** Stores a reference to the object that handles variable interpolation. */
196196
private AtomicReference<ConfigurationInterpolator> interpolator;

0 commit comments

Comments
 (0)