]> source.dussan.org Git - poi.git/commitdiff
mark some variables that are used in synchronized code as volatile
authorPJ Fanning <fanningpj@apache.org>
Mon, 30 Jan 2023 14:46:43 +0000 (14:46 +0000)
committerPJ Fanning <fanningpj@apache.org>
Mon, 30 Jan 2023 14:46:43 +0000 (14:46 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907114 13f79535-47bb-0310-9956-ffa450edef68

poi/src/main/java/org/apache/poi/hpsf/ClassIDPredefined.java
poi/src/main/java/org/apache/poi/ss/format/CellDateFormatter.java

index 61d6566c66be043519067104b39673712ef7321c..963e447de48436e344c3291bba5be841f1b3c5e9 100644 (file)
@@ -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;
 
index 24a95b023f0ccc4c51f2f0c4cc094bb2355778b1..081863be782aa9071bde612ced0507d1a849ee96 100644 (file)
@@ -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;