diff options
author | Dominik Stadler <centic@apache.org> | 2024-07-18 07:10:35 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2024-07-18 07:10:35 +0000 |
commit | 67399705306ac98622a4cdbbdee70b79f169fe47 (patch) | |
tree | 4d741559134734fb5f88143760820bcd8c71f22a | |
parent | 0dea4a301c971c42ceaf0ed43cc6a3545026507e (diff) | |
download | poi-67399705306ac98622a4cdbbdee70b79f169fe47.tar.gz poi-67399705306ac98622a4cdbbdee70b79f169fe47.zip |
Apply some IDE suggestions, improve JavaDoc and simplify reporting log messages
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919343 13f79535-47bb-0310-9956-ffa450edef68
3 files changed, 11 insertions, 6 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipArchiveFakeEntry.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipArchiveFakeEntry.java index edb8817bed..f5a5ee5159 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipArchiveFakeEntry.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipArchiveFakeEntry.java @@ -69,8 +69,8 @@ import org.apache.poi.util.TempFile; } } else { tempFile = TempFile.createTempFile("poi-zip-entry", ".tmp"); - LOG.atInfo().log("created for temp file {} for zip entry {} of size {} bytes", - () -> tempFile.getAbsolutePath(), entry::getName, () -> entrySize); + LOG.atInfo().log("Creating temp file {} for zip entry {} of size {} bytes", + tempFile.getAbsolutePath(), entry.getName(), entrySize); IOUtils.copy(inp, tempFile); } } else { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/XmlVisioDocument.java b/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/XmlVisioDocument.java index 55e724e79b..e6195a8578 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/XmlVisioDocument.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/XmlVisioDocument.java @@ -59,6 +59,11 @@ public class XmlVisioDocument extends POIXMLDocument { protected XDGFMasters _masters; protected XDGFDocument _document; + /** + * Construct a VisioDocument from the given OPCPackage + * @param pkg The xml-base input for the Visio document + * @throws IOException If parsing the document fails + */ public XmlVisioDocument(OPCPackage pkg) throws IOException { super(pkg, PackageRelationshipTypes.VISIO_CORE_DOCUMENT); @@ -78,7 +83,7 @@ public class XmlVisioDocument extends POIXMLDocument { /** * @param stream InputStream - closed when it is read - * @throws IOException + * @throws IOException If parsing the document fails */ public XmlVisioDocument(InputStream stream) throws IOException { this(stream, true); @@ -87,7 +92,7 @@ public class XmlVisioDocument extends POIXMLDocument { /** * @param stream InputStream * @param closeStream Whether to close the InputStream - * @throws IOException + * @throws IOException If parsing the document fails * @since POI 5.2.5 */ public XmlVisioDocument(InputStream stream, boolean closeStream) throws IOException { diff --git a/poi/src/main/java/org/apache/poi/ddf/EscherRecord.java b/poi/src/main/java/org/apache/poi/ddf/EscherRecord.java index e633a92079..de5b95b22d 100644 --- a/poi/src/main/java/org/apache/poi/ddf/EscherRecord.java +++ b/poi/src/main/java/org/apache/poi/ddf/EscherRecord.java @@ -373,14 +373,14 @@ public abstract class EscherRecord implements Duplicatable, GenericRecord { public abstract EscherRecord copy(); /** - * @param length the max record length allowed for EscherArrayProperty + * @param length the max number of children allowed for EscherRecords which support nesting */ public static void setMaxNumberOfChildren(int length) { MAX_NUMBER_OF_CHILDREN = length; } /** - * @return the max record length allowed for EscherArrayProperty + * @return the max number of children allowed for EscherRecords which support nesting */ public static int getMaxNumberOfChildren() { return MAX_NUMBER_OF_CHILDREN; |