Author: fanningpj
Date: Thu Sep 12 21:16:34 2024
New Revision: 1920600

URL: http://svn.apache.org/viewvc?rev=1920600&view=rev
Log:
[bug-69209] default ignoreMissingFontSystem to true

Modified:
    poi/trunk/poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java

Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java?rev=1920600&r1=1920599&r2=1920600&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java Thu Sep 
12 21:16:34 2024
@@ -100,10 +100,10 @@ public class SheetUtil {
 
     /**
      * A system property which can be enabled to not fail when the
-     * font-system is not available on the current machine
+     * font-system is not available on the current machine.
+     * Since POI 5.3.1, this flag is enabled by default.
      */
-    private static boolean ignoreMissingFontSystem =
-            
Boolean.parseBoolean(System.getProperty("org.apache.poi.ss.ignoreMissingFontSystem"));
+    private static boolean ignoreMissingFontSystem = 
initIgnoreMissingFontSystemFlag();
 
     /**
      * Which default char-width to use if the font-system is unavailable.
@@ -507,4 +507,12 @@ public class SheetUtil {
     protected static void setFontRenderContext(FontRenderContext 
fontRenderContext) {
         SheetUtil.fontRenderContext = fontRenderContext;
     }
+
+    private static boolean initIgnoreMissingFontSystemFlag() {
+        final String flag = 
System.getProperty("org.apache.poi.ss.ignoreMissingFontSystem");
+        if (flag != null) {
+            return !flag.trim().equalsIgnoreCase("false");
+        }
+        return true;
+    }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org

Reply via email to