avoid string concats

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884572 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2020-12-17 21:03:27 +00:00
parent f9387f37b3
commit 0e0d1d56da
42 changed files with 78 additions and 77 deletions

View File

@ -333,9 +333,9 @@ public abstract class POIDocument implements Closeable {
// Create or Update the Property Set stream in the POIFS
outFS.createOrUpdateDocument(bIn, name);
logger.log(POILogger.INFO, "Wrote property set " + name + " of size " + data.length);
logger.log(POILogger.INFO, "Wrote property set ", name, " of size ", data.length);
} catch(WritingNotSupportedException ignored) {
logger.log( POILogger.ERROR, "Couldn't write property set with name " + name + " as not supported by HPSF yet");
logger.log( POILogger.ERROR, "Couldn't write property set with name ", name, " as not supported by HPSF yet");
}
}

View File

@ -393,7 +393,7 @@ public class CustomProperties implements Map<String,Object> {
try {
cps = CodePageUtil.codepageToEncoding(cp, false);
} catch (UnsupportedEncodingException e) {
LOG.log(POILogger.ERROR, "Codepage '"+cp+"' can't be found.");
LOG.log(POILogger.ERROR, "Codepage '", cp, "' can't be found.");
}
if (!cps.isEmpty() && Charset.forName(cps).newEncoder().canEncode(value)) {
return;

View File

@ -81,7 +81,7 @@ public final class BiffViewer {
try {
hasNext = recStream.hasNextRecord();
} catch (LeftoverDataException e) {
logger.log(POILogger.ERROR, "Discarding " + recStream.remaining() + " bytes and continuing", e);
logger.log(POILogger.ERROR, "Discarding ", recStream.remaining(), " bytes and continuing", e);
recStream.readRemainder();
hasNext = recStream.hasNextRecord();
}

View File

@ -155,8 +155,8 @@ public class FormatTrackingHSSFListener implements HSSFListener {
if (formatIndex >= HSSFDataFormat.getNumberOfBuiltinBuiltinFormats()) {
FormatRecord tfr = _customFormatRecords.get(Integer.valueOf(formatIndex));
if (tfr == null) {
logger.log( POILogger.ERROR, "Requested format at index " + formatIndex
+ ", but it wasn't found");
logger.log( POILogger.ERROR, "Requested format at index ", formatIndex,
", but it wasn't found");
} else {
format = tfr.getFormatString();
}
@ -192,8 +192,8 @@ public class FormatTrackingHSSFListener implements HSSFListener {
public int getFormatIndex(CellValueRecordInterface cell) {
ExtendedFormatRecord xfr = _xfRecords.get(cell.getXFIndex());
if (xfr == null) {
logger.log( POILogger.ERROR, "Cell " + cell.getRow() + "," + cell.getColumn()
+ " uses XF with index " + cell.getXFIndex() + ", but we don't have that");
logger.log( POILogger.ERROR, "Cell ", cell.getRow(), ",", cell.getColumn(),
" uses XF with index ", cell.getXFIndex(), ", but we don't have that");
return -1;
}
return xfr.getFormatIndex();

View File

@ -157,7 +157,7 @@ public final class EmbeddedObjectRefSubRecord extends SubRecord {
int nUnexpectedPadding = remaining - dataLenAfterFormula;
if (nUnexpectedPadding > 0) {
logger.log( POILogger.ERROR, "Discarding " + nUnexpectedPadding + " unexpected padding bytes ");
logger.log( POILogger.ERROR, "Discarding ", nUnexpectedPadding, " unexpected padding bytes");
readRawData(in, nUnexpectedPadding);
remaining-=nUnexpectedPadding;
}

View File

@ -108,7 +108,7 @@ public final class FeatRecord extends StandardRecord {
sharedFeature = new FeatSmartTag(in);
break;
default:
logger.log( POILogger.ERROR, "Unknown Shared Feature " + isf_sharedFeatureType + " found!");
logger.log( POILogger.ERROR, "Unknown Shared Feature ", isf_sharedFeatureType, " found!");
}
}

View File

@ -50,18 +50,18 @@ class SSTDeserializer
for (int i=0;i<stringCount;i++) {
// Extract exactly the count of strings from the SST record.
UnicodeString str;
if(in.available() == 0 && ! in.hasNextRecord()) {
logger.log( POILogger.ERROR, "Ran out of data before creating all the strings! String at index " + i + "");
str = new UnicodeString("");
} else {
str = new UnicodeString(in);
}
if (in.available() == 0 && !in.hasNextRecord()) {
logger.log(POILogger.ERROR, "Ran out of data before creating all the strings! String at index ", i);
str = new UnicodeString("");
} else {
str = new UnicodeString(in);
}
addToStringTable( strings, str );
}
}
static public void addToStringTable( IntMapper<UnicodeString> strings, UnicodeString string )
{
strings.add(string);
strings.add(string);
}
}

View File

@ -324,7 +324,7 @@ public abstract class ChunkedCipherOutputStream extends FilterOutputStream {
}
if (!fileOut.delete()) {
LOG.log(POILogger.ERROR, "Can't delete temporary encryption file: "+fileOut);
LOG.log(POILogger.ERROR, "Can't delete temporary encryption file: ", fileOut);
}
} catch (IOException e) {
throw new EncryptedDocumentException(e);

View File

@ -193,7 +193,7 @@ public class StandardEncryptor extends Encryptor {
IOUtils.copy(fis, leos);
}
if (!fileOut.delete()) {
logger.log(POILogger.ERROR, "Can't delete temporary encryption file: "+fileOut);
logger.log(POILogger.ERROR, "Can't delete temporary encryption file: ", fileOut);
}
leos.close();

View File

@ -152,7 +152,7 @@ public final class DateFormatConverter {
loc = LocaleID.lookupByLanguageTag(languageTag.substring(0, idx));
}
if (loc == null) {
logger.log( POILogger.ERROR, "Unable to find prefix for Locale '" + languageTag + "' or its parent locales." );
logger.log( POILogger.ERROR, "Unable to find prefix for Locale '", languageTag, "' or its parent locales." );
return "";
}
}

View File

@ -29,7 +29,7 @@ public class Configurator {
try {
result = Integer.parseInt(property);
} catch (Exception e) {
logger.log(POILogger.ERROR, "System property -D"+systemProperty +" do not contains a valid integer " + property);
logger.log(POILogger.ERROR, "System property -D", systemProperty, " does not contains a valid integer: ", property);
}
return result;
}

View File

@ -394,7 +394,7 @@ public final class IOUtils {
try {
closeable.close();
} catch ( Exception exc ) {
logger.log( POILogger.ERROR, "Unable to close resource: " + exc,
logger.log( POILogger.ERROR, "Unable to close resource: ", exc,
exc );
}
}

View File

@ -60,7 +60,12 @@ public class SystemOutLogger implements POILogger {
if (!check(level)) {
return;
}
System.out.println("[" + _cat + "]" + LEVEL_STRINGS_SHORT.charAt(Math.min(LEVEL_STRINGS_SHORT.length()-1, level)) + " " + obj1);
System.out.print("[");
System.out.print(_cat);
System.out.print("]");
System.out.print(LEVEL_STRINGS_SHORT.charAt(Math.min(LEVEL_STRINGS_SHORT.length()-1, level)));
System.out.print(" ");
System.out.println(obj1);
if (exception != null) {
exception.printStackTrace(System.out);
}

View File

@ -651,7 +651,7 @@ public class POIXMLDocumentPart {
final PackagePart p = packagePart.getPackage().getPart(relName);
if (p == null) {
logger.log(POILogger.ERROR, "Skipped invalid entry " + rel.getTargetURI());
logger.log(POILogger.ERROR, "Skipped invalid entry ", rel.getTargetURI());
continue;
}

View File

@ -1006,9 +1006,8 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
sourcePartName = PackagingURIHelper.createPartName(sourceURI);
} catch (InvalidFormatException e) {
logger
.log(POILogger.ERROR, "Part name URI '"
+ sourceURI
+ "' is not valid ! This message is not intended to be displayed !");
.log(POILogger.ERROR, "Part name URI '", sourceURI,
"' is not valid ! This message is not intended to be displayed !");
return;
}
if (sourcePartName.getURI().equals(

View File

@ -348,8 +348,8 @@ public final class PackageRelationshipCollection implements
// package
target = PackagingURIHelper.toURI(value);
} catch (URISyntaxException e) {
logger.log(POILogger.ERROR, "Cannot convert " + value
+ " in a valid relationship URI-> dummy-URI used", e);
logger.log(POILogger.ERROR, "Cannot convert ", value,
" in a valid relationship URI-> dummy-URI used", e);
}
addRelationship(target, targetMode, type, id);
}

View File

@ -145,7 +145,7 @@ public final class ZipPackage extends OPCPackage {
throw new InvalidOperationException("Can't open the specified file: '" + file + "'", e);
}
LOG.log(POILogger.ERROR, "Error in zip file "+file+" - falling back to stream processing (i.e. ignoring zip central directory)");
LOG.log(POILogger.ERROR, "Error in zip file ", file, " - falling back to stream processing (i.e. ignoring zip central directory)");
ze = openZipEntrySourceStream(file);
}
this.zipArchive = ze;

View File

@ -71,8 +71,8 @@ public class ZipContentTypeManager extends ContentTypeManager {
zos.closeArchiveEntry();
}
} catch (IOException ioe) {
logger.log(POILogger.ERROR, "Cannot write: " + CONTENT_TYPES_PART_NAME
+ " in Zip !", ioe);
logger.log(POILogger.ERROR, "Cannot write: ", CONTENT_TYPES_PART_NAME,
" in Zip !", ioe);
return false;
}
}

View File

@ -64,7 +64,7 @@ public final class ZipPartMarshaller implements PartMarshaller {
public boolean marshall(PackagePart part, OutputStream os)
throws OpenXML4JException {
if (!(os instanceof ZipArchiveOutputStream)) {
logger.log(POILogger.ERROR,"Unexpected class " + os.getClass().getName());
logger.log(POILogger.ERROR,"Unexpected class ", os.getClass().getName());
throw new OpenXML4JException("ZipOutputStream expected !");
// Normally should happen only in development phase, so just throw
// exception
@ -91,7 +91,7 @@ public final class ZipPartMarshaller implements PartMarshaller {
zos.closeArchiveEntry();
}
} catch (IOException ioe) {
logger.log(POILogger.ERROR,"Cannot write: " + part.getPartName() + ": in ZIP",
logger.log(POILogger.ERROR,"Cannot write: ", part.getPartName(), ": in ZIP",
ioe);
return false;
}
@ -186,7 +186,7 @@ public final class ZipPartMarshaller implements PartMarshaller {
zos.closeArchiveEntry();
}
} catch (IOException e) {
logger.log(POILogger.ERROR,"Cannot create zip entry " + relPartName, e);
logger.log(POILogger.ERROR,"Cannot create zip entry ", relPartName, e);
return false;
}
}

View File

@ -138,7 +138,7 @@ public class RelationshipTransformService extends TransformService {
@Override
public void init(XMLStructure parent, XMLCryptoContext context) throws InvalidAlgorithmParameterException {
LOG.log(POILogger.DEBUG, "init(parent,context)");
LOG.log(POILogger.DEBUG, "parent java type: " + parent.getClass().getName());
LOG.log(POILogger.DEBUG, "parent java type: ", parent.getClass().getName());
DOMStructure domParent = (DOMStructure) parent;
Node parentNode = domParent.getNode();

View File

@ -151,8 +151,8 @@ public class TSPTimeStampService implements TimeStampService {
int statusCode = huc.getResponseCode();
if (statusCode != 200) {
LOG.log(POILogger.ERROR, "Error contacting TSP server ", signatureConfig.getTspUrl() +
", had status code " + statusCode + "/" + huc.getResponseMessage());
LOG.log(POILogger.ERROR, "Error contacting TSP server ", signatureConfig.getTspUrl(),
", had status code ", statusCode, "/", huc.getResponseMessage());
throw new IOException("Error contacting TSP server " + signatureConfig.getTspUrl() +
", had status code " + statusCode + "/" + huc.getResponseMessage());
}

View File

@ -1848,7 +1848,7 @@ import org.openxmlformats.schemas.presentationml.x2006.main.CTBackgroundProperti
} else if (props instanceof CTTextCharacterProperties) {
obj = new TextCharDelegate((CTTextCharacterProperties)props);
} else {
LOG.log(POILogger.ERROR, props.getClass() +" is an unknown properties type");
LOG.log(POILogger.ERROR, props.getClass(), " is an unknown properties type");
return null;
}

View File

@ -360,7 +360,7 @@ public class XSSFSheetXMLHandler extends DefaultHandler {
thisStr = rtss.toString();
}
catch (NumberFormatException ex) {
logger.log(POILogger.ERROR, "Failed to parse SST index '" + sstIndex, ex);
logger.log(POILogger.ERROR, "Failed to parse SST index '", sstIndex, ex);
}
break;

View File

@ -186,7 +186,7 @@ public class SheetDataWriter implements Closeable {
@Override
protected void finalize() throws Throwable {
if (_fd.exists() && !_fd.delete()) {
logger.log(POILogger.ERROR, "Can't delete temporary encryption file: "+_fd);
logger.log(POILogger.ERROR, "Can't delete temporary encryption file: ", _fd);
}
}

View File

@ -557,7 +557,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
break;
}
}
logger.log(POILogger.ERROR, "Can't find drawing with id=" + ctDrawing.getId() + " in the list of the sheet's relationships");
logger.log(POILogger.ERROR, "Can't find drawing with id=", ctDrawing.getId(), " in the list of the sheet's relationships");
}
return null;
}
@ -629,7 +629,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
}
}
if(drawing == null){
logger.log(POILogger.ERROR, "Can't find VML drawing with id=" + id + " in the list of the sheet's relationships");
logger.log(POILogger.ERROR, "Can't find VML drawing with id=", id, " in the list of the sheet's relationships");
}
}
return drawing;

View File

@ -165,7 +165,7 @@ public final class ChunkFactory {
data, endOfDataPos);
endOfDataPos += 8;
} else {
logger.log(POILogger.ERROR, "Header claims a length to " + endOfDataPos + " there's then no space for the trailer in the data (" + data.length + ")");
logger.log(POILogger.ERROR, "Header claims a length to ", endOfDataPos, " there's then no space for the trailer in the data (", data.length, ")");
}
}
if(header.hasSeparator()) {
@ -173,7 +173,7 @@ public final class ChunkFactory {
separator = new ChunkSeparator(
data, endOfDataPos);
} else {
logger.log(POILogger.ERROR, "Header claims a length to " + endOfDataPos + " there's then no space for the separator in the data (" + data.length + ")");
logger.log(POILogger.ERROR, "Header claims a length to ", endOfDataPos, " there's then no space for the separator in the data (", data.length, ")");
}
}

View File

@ -73,7 +73,7 @@ public final class ChunkStream extends Stream {
}
catch (Exception e)
{
logger.log(POILogger.ERROR, "Failed to create chunk at " + pos + ", ignoring rest of data." + e);
logger.log(POILogger.ERROR, "Failed to create chunk at ", pos, ", ignoring rest of data." + e);
}
chunks = chunksA.toArray(new Chunk[0]);

View File

@ -85,7 +85,7 @@ public final class PICT extends Metafile {
out.write(chunk, 0, lastLen);
}
// End of picture marker for PICT is 0x00 0xFF
LOG.log(POILogger.ERROR, "PICT zip-stream is invalid, read as much as possible. Uncompressed length of header: " + header.getWmfSize() + " / Read bytes: " + out.size(), e);
LOG.log(POILogger.ERROR, "PICT zip-stream is invalid, read as much as possible. Uncompressed length of header: ", header.getWmfSize(), " / Read bytes: ", out.size(), e);
}
return out.toByteArray();
}

View File

@ -58,7 +58,7 @@ public final class AnimationInfo extends RecordContainer {
if(_children[0] instanceof AnimationInfoAtom) {
animationAtom = (AnimationInfoAtom)_children[0];
} else {
logger.log(POILogger.ERROR, "First child record wasn't a AnimationInfoAtom, was of type " + _children[0].getRecordType());
logger.log(POILogger.ERROR, "First child record wasn't a AnimationInfoAtom, was of type ", _children[0].getRecordType());
}
}

View File

@ -105,14 +105,14 @@ public class ExEmbed extends RecordContainer {
if(_children[0] instanceof ExEmbedAtom) {
embedAtom = (ExEmbedAtom)_children[0];
} else {
logger.log(POILogger.ERROR, "First child record wasn't a ExEmbedAtom, was of type " + _children[0].getRecordType());
logger.log(POILogger.ERROR, "First child record wasn't a ExEmbedAtom, was of type ", _children[0].getRecordType());
}
// Second child should be the ExOleObjAtom
if (_children[1] instanceof ExOleObjAtom) {
oleObjAtom = (ExOleObjAtom)_children[1];
} else {
logger.log(POILogger.ERROR, "Second child record wasn't a ExOleObjAtom, was of type " + _children[1].getRecordType());
logger.log(POILogger.ERROR, "Second child record wasn't a ExOleObjAtom, was of type ", _children[1].getRecordType());
}
for (int i = 2; i < _children.length; i++) {

View File

@ -118,7 +118,7 @@ public class ExHyperlink extends RecordContainer {
if(_children[0] instanceof ExHyperlinkAtom) {
linkAtom = (ExHyperlinkAtom)_children[0];
} else {
logger.log(POILogger.ERROR, "First child record wasn't a ExHyperlinkAtom, was of type " + _children[0].getRecordType());
logger.log(POILogger.ERROR, "First child record wasn't a ExHyperlinkAtom, was of type ", _children[0].getRecordType());
}
for (int i = 1; i < _children.length; i++) {
@ -126,7 +126,7 @@ public class ExHyperlink extends RecordContainer {
if ( linkDetailsA == null) linkDetailsA = (CString)_children[i];
else linkDetailsB = (CString)_children[i];
} else {
logger.log(POILogger.ERROR, "Record after ExHyperlinkAtom wasn't a CString, was of type " + _children[1].getRecordType());
logger.log(POILogger.ERROR, "Record after ExHyperlinkAtom wasn't a CString, was of type ", _children[1].getRecordType());
}
}

View File

@ -60,12 +60,12 @@ public final class ExVideoContainer extends RecordContainer {
if(_children[0] instanceof ExMediaAtom) {
mediaAtom = (ExMediaAtom)_children[0];
} else {
logger.log(POILogger.ERROR, "First child record wasn't a ExMediaAtom, was of type " + _children[0].getRecordType());
logger.log(POILogger.ERROR, "First child record wasn't a ExMediaAtom, was of type ", _children[0].getRecordType());
}
if(_children[1] instanceof CString) {
pathAtom = (CString)_children[1];
} else {
logger.log(POILogger.ERROR, "Second child record wasn't a CString, was of type " + _children[1].getRecordType());
logger.log(POILogger.ERROR, "Second child record wasn't a CString, was of type ", _children[1].getRecordType());
}
}

View File

@ -68,14 +68,14 @@ public final class Sound extends RecordContainer {
if(_children[0] instanceof CString) {
_name = (CString)_children[0];
} else {
logger.log(POILogger.ERROR, "First child record wasn't a CString, was of type " + _children[0].getRecordType());
logger.log(POILogger.ERROR, "First child record wasn't a CString, was of type ", _children[0].getRecordType());
}
// Second child should be the ExOleObjAtom
if (_children[1] instanceof CString) {
_type = (CString)_children[1];
} else {
logger.log(POILogger.ERROR, "Second child record wasn't a CString, was of type " + _children[1].getRecordType());
logger.log(POILogger.ERROR, "Second child record wasn't a CString, was of type ", _children[1].getRecordType());
}
for (int i = 2; i < _children.length; i++) {

View File

@ -98,7 +98,7 @@ public final class TextRulerAtom extends RecordAtom {
// Get the record data.
read(leis);
} catch (IOException e){
logger.log(POILogger.ERROR, "Failed to parse TextRulerAtom: " + e.getMessage());
logger.log(POILogger.ERROR, "Failed to parse TextRulerAtom: ", e.getMessage());
}
}

View File

@ -289,7 +289,7 @@ implements HSLFShapeContainer, GroupShape<HSLFShape,HSLFTextParagraph> {
} else {
// Should we do anything special with these non
// Container records?
LOG.log(POILogger.ERROR, "Shape contained non container escher record, was " + r.getClass().getName());
LOG.log(POILogger.ERROR, "Shape contained non container escher record, was ", r.getClass().getName());
}
}

View File

@ -127,7 +127,7 @@ public class HSLFPictureShape extends HSLFSimpleShape implements PictureShape<HS
return pd;
}
}
LOG.log(POILogger.ERROR, "no picture found for our BSE offset " + bse.getOffset());
LOG.log(POILogger.ERROR, "no picture found for our BSE offset ", bse.getOffset());
}
return null;
}

View File

@ -290,8 +290,7 @@ public final class HSLFSlideShow extends POIDocument implements SlideShow<HSLFSh
return _mostRecentCoreRecords[coreRecordId];
}
logger.log(POILogger.ERROR,
"We tried to look up a reference to a core record, but there was no core ID for reference ID "
+ refID);
"We tried to look up a reference to a core record, but there was no core ID for reference ID ", refID);
return null;
}
@ -388,7 +387,7 @@ public final class HSLFSlideShow extends POIDocument implements SlideShow<HSLFSh
// Ensure it really is a notes record
if (!(r instanceof Notes)) {
logger.log(POILogger.ERROR, loggerLoc+", but that was actually a " + r);
logger.log(POILogger.ERROR, loggerLoc, ", but that was actually a ", r);
continue;
}
@ -420,10 +419,10 @@ public final class HSLFSlideShow extends POIDocument implements SlideShow<HSLFSh
// Ensure it really is a slide record
if (!(r instanceof Slide)) {
logger.log(POILogger.ERROR, "A Slide SlideAtomSet at " + idx
+ " said its record was at refID "
+ spa.getRefID()
+ ", but that was actually a " + r);
logger.log(POILogger.ERROR, "A Slide SlideAtomSet at ", idx,
" said its record was at refID ",
spa.getRefID(),
", but that was actually a ", r);
continue;
}
@ -439,7 +438,7 @@ public final class HSLFSlideShow extends POIDocument implements SlideShow<HSLFSh
if (notesPos != null && 0 <= notesPos && notesPos < _notes.size()) {
notes = _notes.get(notesPos);
} else {
logger.log(POILogger.ERROR, "Notes not found for noteId=" + noteId);
logger.log(POILogger.ERROR, "Notes not found for noteId=", noteId);
}
}

View File

@ -330,7 +330,7 @@ public final class HSLFSlideShowImpl extends POIDocument implements Closeable {
try {
currentUser = new CurrentUserAtom(getDirectory());
} catch (IOException ie) {
logger.log(POILogger.ERROR, "Error finding Current User Atom:\n" + ie);
logger.log(POILogger.ERROR, "Error finding Current User Atom", ie);
currentUser = new CurrentUserAtom();
}
}
@ -394,8 +394,8 @@ public final class HSLFSlideShowImpl extends POIDocument implements Closeable {
// If they type (including the bonus 0xF018) is 0, skip it
PictureType pt = PictureType.forNativeID(type - 0xF018);
if (pt == null) {
logger.log(POILogger.ERROR, "Problem reading picture: Invalid image type 0, on picture with length " + imgsize + ".\nYou document will probably become corrupted if you save it!");
logger.log(POILogger.ERROR, "" + pos);
logger.log(POILogger.ERROR, "Problem reading picture: Invalid image type 0, on picture with length ", imgsize, ".\nYou document will probably become corrupted if you save it!");
logger.log(POILogger.ERROR, "position: ", pos);
} else {
//The pictstream can be truncated halfway through a picture.
//This is not a problem if the pictstream contains extra pictures
@ -418,7 +418,7 @@ public final class HSLFSlideShowImpl extends POIDocument implements Closeable {
pict.setIndex(_pictures.size());
_pictures.add(pict);
} catch (IllegalArgumentException e) {
logger.log(POILogger.ERROR, "Problem reading picture: " + e + "\nYou document will probably become corrupted if you save it!");
logger.log(POILogger.ERROR, "Problem reading picture: ", e, "\nYou document will probably become corrupted if you save it!");
}
}

View File

@ -187,7 +187,7 @@ public class AttachmentChunks implements ChunkGroup {
} else if (chunk instanceof DirectoryChunk) {
attachmentDirectory = (DirectoryChunk) chunk;
} else {
LOG.log(POILogger.ERROR, "Unexpected data chunk of type " + chunk.getEntryName());
LOG.log(POILogger.ERROR, "Unexpected data chunk of type ", chunk.getEntryName());
}
} else if (chunkId == ATTACH_EXTENSION.id) {
attachExtension = (StringChunk) chunk;

View File

@ -88,8 +88,7 @@ public final class RecipientChunks implements ChunkGroupWithProperties {
try {
recipientNumber = Integer.parseInt(number, 16);
} catch (NumberFormatException e) {
LOG.log(POILogger.ERROR,
"Invalid recipient number in name " + name);
LOG.log(POILogger.ERROR, "Invalid recipient number in name ", name);
}
}
}

View File

@ -149,7 +149,7 @@ public final class POIFSChunkParser {
try (DocumentInputStream inp = new DocumentInputStream((DocumentNode) entry)) {
chunk.readValue(inp);
} catch (IOException e) {
LOG.log(POILogger.ERROR, "Error reading from part " + entry.getName(), e);
LOG.log(POILogger.ERROR, "Error reading from part ", entry.getName(), e);
}
}

View File

@ -73,8 +73,7 @@ public final class ParagraphSprmUncompressor
{
logger.log(
POILogger.ERROR,
"Unable to apply SPRM operation '"
+ sprm.getOperation() + "': ", exc );
"Unable to apply SPRM operation '", sprm.getOperation(), "': ", exc );
}
}
}