mirror of https://github.com/apache/poi.git
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
This commit is contained in:
parent
0dea4a301c
commit
6739970530
|
@ -69,8 +69,8 @@ import org.apache.poi.util.TempFile;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
tempFile = TempFile.createTempFile("poi-zip-entry", ".tmp");
|
tempFile = TempFile.createTempFile("poi-zip-entry", ".tmp");
|
||||||
LOG.atInfo().log("created for temp file {} for zip entry {} of size {} bytes",
|
LOG.atInfo().log("Creating temp file {} for zip entry {} of size {} bytes",
|
||||||
() -> tempFile.getAbsolutePath(), entry::getName, () -> entrySize);
|
tempFile.getAbsolutePath(), entry.getName(), entrySize);
|
||||||
IOUtils.copy(inp, tempFile);
|
IOUtils.copy(inp, tempFile);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -59,6 +59,11 @@ public class XmlVisioDocument extends POIXMLDocument {
|
||||||
protected XDGFMasters _masters;
|
protected XDGFMasters _masters;
|
||||||
protected XDGFDocument _document;
|
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 {
|
public XmlVisioDocument(OPCPackage pkg) throws IOException {
|
||||||
super(pkg, PackageRelationshipTypes.VISIO_CORE_DOCUMENT);
|
super(pkg, PackageRelationshipTypes.VISIO_CORE_DOCUMENT);
|
||||||
|
|
||||||
|
@ -78,7 +83,7 @@ public class XmlVisioDocument extends POIXMLDocument {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param stream InputStream - closed when it is read
|
* @param stream InputStream - closed when it is read
|
||||||
* @throws IOException
|
* @throws IOException If parsing the document fails
|
||||||
*/
|
*/
|
||||||
public XmlVisioDocument(InputStream stream) throws IOException {
|
public XmlVisioDocument(InputStream stream) throws IOException {
|
||||||
this(stream, true);
|
this(stream, true);
|
||||||
|
@ -87,7 +92,7 @@ public class XmlVisioDocument extends POIXMLDocument {
|
||||||
/**
|
/**
|
||||||
* @param stream InputStream
|
* @param stream InputStream
|
||||||
* @param closeStream Whether to close the InputStream
|
* @param closeStream Whether to close the InputStream
|
||||||
* @throws IOException
|
* @throws IOException If parsing the document fails
|
||||||
* @since POI 5.2.5
|
* @since POI 5.2.5
|
||||||
*/
|
*/
|
||||||
public XmlVisioDocument(InputStream stream, boolean closeStream) throws IOException {
|
public XmlVisioDocument(InputStream stream, boolean closeStream) throws IOException {
|
||||||
|
|
|
@ -373,14 +373,14 @@ public abstract class EscherRecord implements Duplicatable, GenericRecord {
|
||||||
public abstract EscherRecord copy();
|
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) {
|
public static void setMaxNumberOfChildren(int length) {
|
||||||
MAX_NUMBER_OF_CHILDREN = 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() {
|
public static int getMaxNumberOfChildren() {
|
||||||
return MAX_NUMBER_OF_CHILDREN;
|
return MAX_NUMBER_OF_CHILDREN;
|
||||||
|
|
Loading…
Reference in New Issue