diff options
author | PJ Fanning <fanningpj@apache.org> | 2023-01-30 14:46:43 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2023-01-30 14:46:43 +0000 |
commit | 34f6955a281eff729acb459e7469252971bec089 (patch) | |
tree | 8bd31104baa713bb337041b6008811232187f94f | |
parent | 6f606cabdaa82f15b4e3e17c4ced3ee2943272b8 (diff) | |
download | poi-34f6955a281eff729acb459e7469252971bec089.tar.gz poi-34f6955a281eff729acb459e7469252971bec089.zip |
mark some variables that are used in synchronized code as volatile
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907114 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | poi/src/main/java/org/apache/poi/hpsf/ClassIDPredefined.java | 2 | ||||
-rw-r--r-- | poi/src/main/java/org/apache/poi/ss/format/CellDateFormatter.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/poi/src/main/java/org/apache/poi/hpsf/ClassIDPredefined.java b/poi/src/main/java/org/apache/poi/hpsf/ClassIDPredefined.java index 61d6566c66..963e447de4 100644 --- a/poi/src/main/java/org/apache/poi/hpsf/ClassIDPredefined.java +++ b/poi/src/main/java/org/apache/poi/hpsf/ClassIDPredefined.java @@ -112,7 +112,7 @@ public enum ClassIDPredefined { } private final String externalForm; - private ClassID classId; + private volatile ClassID classId; private final String fileExtension; private final String contentType; diff --git a/poi/src/main/java/org/apache/poi/ss/format/CellDateFormatter.java b/poi/src/main/java/org/apache/poi/ss/format/CellDateFormatter.java index 24a95b023f..081863be78 100644 --- a/poi/src/main/java/org/apache/poi/ss/format/CellDateFormatter.java +++ b/poi/src/main/java/org/apache/poi/ss/format/CellDateFormatter.java @@ -44,7 +44,7 @@ public class CellDateFormatter extends CellFormatter { private static final int NUM_MILLISECONDS_IN_DAY = 1000 * 60 * 60 * 24; - private static CellDateFormatter SIMPLE_DATE_FORMATTER; + private static volatile CellDateFormatter SIMPLE_DATE_FORMATTER; class DatePartHandler implements CellFormatPart.PartHandler { private int mStart = -1; |