You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ab...@apache.org on 2019/05/21 00:14:15 UTC
svn commit: r1859596 -
/poi/trunk/src/java/org/apache/poi/hpsf/CodePageString.java
Author: abearez
Date: Tue May 21 00:14:15 2019
New Revision: 1859596
URL: http://svn.apache.org/viewvc?rev=1859596&view=rev
Log:
fix missing space in string literal (LGTM)
Modified:
poi/trunk/src/java/org/apache/poi/hpsf/CodePageString.java
Modified: poi/trunk/src/java/org/apache/poi/hpsf/CodePageString.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hpsf/CodePageString.java?rev=1859596&r1=1859595&r2=1859596&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hpsf/CodePageString.java (original)
+++ poi/trunk/src/java/org/apache/poi/hpsf/CodePageString.java Tue May 21 00:14:15 2019
@@ -54,8 +54,8 @@ public class CodePageString {
// CodePage property has any other value, it MUST be a null-terminated array of 8-bit characters
// from the code page identified by the CodePage property, followed by zero padding to a
// multiple of 4 bytes. The string represented by this field MAY contain embedded or additional
- // trailing null characters and an OLEPS implementation MUST be able to handle such strings.
-
+ // trailing null characters and an OLEPS implementation MUST be able to handle such strings.
+
lei.readFully(_value);
if (_value[size - 1] != 0 ) {
// TODO Some files, such as TestVisioWithCodepage.vsd, are currently
@@ -72,17 +72,17 @@ public class CodePageString {
int cp = ( codepage == -1 ) ? Property.DEFAULT_CODEPAGE : codepage;
String result = CodePageUtil.getStringFromCodePage(_value, cp);
-
+
final int terminator = result.indexOf( '\0' );
if ( terminator == -1 ) {
- String msg =
- "String terminator (\\0) for CodePageString property value not found." +
+ String msg =
+ "String terminator (\\0) for CodePageString property value not found. " +
"Continue without trimming and hope for the best.";
LOG.log(POILogger.WARN, msg);
return result;
}
if ( terminator != result.length() - 1 ) {
- String msg =
+ String msg =
"String terminator (\\0) for CodePageString property value occured before the end of string. "+
"Trimming and hope for the best.";
LOG.log(POILogger.WARN, msg );
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org