From f39f6940c60cef5497ae2e2d7f80341f32cab7ea Mon Sep 17 00:00:00 2001 From: Andreas Beeker Date: Sun, 16 Apr 2017 23:43:56 +0000 Subject: [PATCH] fix forbidden-apis-check error git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1791646 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/ss/usermodel/TestEmbedOLEPackage.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ooxml/testcases/org/apache/poi/ss/usermodel/TestEmbedOLEPackage.java b/src/ooxml/testcases/org/apache/poi/ss/usermodel/TestEmbedOLEPackage.java index 71496c7efb..ec58195922 100644 --- a/src/ooxml/testcases/org/apache/poi/ss/usermodel/TestEmbedOLEPackage.java +++ b/src/ooxml/testcases/org/apache/poi/ss/usermodel/TestEmbedOLEPackage.java @@ -27,6 +27,7 @@ import java.io.IOException; import java.util.Arrays; import java.util.Iterator; import java.util.List; +import java.util.Locale; import org.apache.poi.POIDataSamples; import org.apache.poi.hssf.HSSFTestDataSamples; @@ -84,7 +85,7 @@ public class TestEmbedOLEPackage { } static void validateEmbeddedObjects(Workbook wb) throws IOException { - boolean ooxml = wb.getClass().getName().toLowerCase().contains("xssf"); + boolean ooxml = wb.getClass().getName().toLowerCase(Locale.ROOT).contains("xssf"); byte data[] = (ooxml) ? samplePPTX : samplePPT; Iterator shapeIds = Arrays.asList(1025,1026,2049).iterator(); EmbeddedExtractor ee = new EmbeddedExtractor(); @@ -102,7 +103,7 @@ public class TestEmbedOLEPackage { } static void addEmbeddedObjects(Workbook wb) throws IOException { - boolean ooxml = wb.getClass().getName().toLowerCase().contains("xssf"); + boolean ooxml = wb.getClass().getName().toLowerCase(Locale.ROOT).contains("xssf"); int picIdx = wb.addPicture(samplePNG, Workbook.PICTURE_TYPE_PNG); byte data[] = (ooxml) ? samplePPTX : samplePPT; String ext = (ooxml) ? ".pptx" : ".ppt";