Author: gallon
Date: Fri Jan  4 14:25:11 2019
New Revision: 1850366

URL: http://svn.apache.org/viewvc?rev=1850366&view=rev
Log:
Fixed build (explicitly specified charset for new String(byte[]))

Modified:
    poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java

Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java?rev=1850366&r1=1850365&r2=1850366&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java 
(original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java Fri 
Jan  4 14:25:11 2019
@@ -26,6 +26,7 @@ import static org.junit.Assert.assertTru
 import static org.junit.Assert.fail;
 
 import java.io.IOException;
+import java.nio.charset.StandardCharsets;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.GregorianCalendar;
@@ -1166,7 +1167,7 @@ public abstract class BaseTestCell {
         assertEquals(CellType.NUMERIC, cell.getCellType());
 
         int badLength = 
cell.getSheet().getWorkbook().getSpreadsheetVersion().getMaxTextLength() + 1;
-        String badStringValue = new String(new byte[badLength]);
+        String badStringValue = new String(new byte[badLength], 
StandardCharsets.UTF_8);
 
         try {
             cell.setCellValue(badStringValue);
@@ -1188,7 +1189,7 @@ public abstract class BaseTestCell {
 
         int badLength = 
cell.getSheet().getWorkbook().getSpreadsheetVersion().getMaxTextLength() + 1;
         RichTextString badStringValue = 
cell.getSheet().getWorkbook().getCreationHelper().
-                createRichTextString(new String(new byte[badLength]));
+                createRichTextString(new String(new byte[badLength], 
StandardCharsets.UTF_8));
 
         try {
             cell.setCellValue(badStringValue);



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to