Fix to have consistent whitespace, and add javadoc deprecated entries
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1496673 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9d87fb9caa
commit
bd92cbc8b5
@ -104,11 +104,11 @@ public abstract class POIDocument {
|
||||
* then nothing will happen.
|
||||
*/
|
||||
public void createInformationProperties() {
|
||||
if(!initialized) readProperties();
|
||||
if(sInf == null) {
|
||||
if (!initialized) readProperties();
|
||||
if (sInf == null) {
|
||||
sInf = PropertySetFactory.newSummaryInformation();
|
||||
}
|
||||
if(dsInf == null) {
|
||||
if (dsInf == null) {
|
||||
dsInf = PropertySetFactory.newDocumentSummaryInformation();
|
||||
}
|
||||
}
|
||||
@ -124,7 +124,7 @@ public abstract class POIDocument {
|
||||
|
||||
// DocumentSummaryInformation
|
||||
ps = getPropertySet(DocumentSummaryInformation.DEFAULT_STREAM_NAME);
|
||||
if(ps != null && ps instanceof DocumentSummaryInformation) {
|
||||
if (ps != null && ps instanceof DocumentSummaryInformation) {
|
||||
dsInf = (DocumentSummaryInformation)ps;
|
||||
} else if(ps != null) {
|
||||
logger.log(POILogger.WARN, "DocumentSummaryInformation property set came back with wrong class - ", ps.getClass());
|
||||
@ -132,7 +132,7 @@ public abstract class POIDocument {
|
||||
|
||||
// SummaryInformation
|
||||
ps = getPropertySet(SummaryInformation.DEFAULT_STREAM_NAME);
|
||||
if(ps instanceof SummaryInformation) {
|
||||
if (ps instanceof SummaryInformation) {
|
||||
sInf = (SummaryInformation)ps;
|
||||
} else if(ps != null) {
|
||||
logger.log(POILogger.WARN, "SummaryInformation property set came back with wrong class - ", ps.getClass());
|
||||
@ -148,7 +148,8 @@ public abstract class POIDocument {
|
||||
*/
|
||||
protected PropertySet getPropertySet(String setName) {
|
||||
//directory can be null when creating new documents
|
||||
if(directory == null || !directory.hasEntry(setName)) return null;
|
||||
if (directory == null || !directory.hasEntry(setName))
|
||||
return null;
|
||||
|
||||
DocumentInputStream dis;
|
||||
try {
|
||||
@ -188,14 +189,14 @@ public abstract class POIDocument {
|
||||
*/
|
||||
protected void writeProperties(POIFSFileSystem outFS, List<String> writtenEntries) throws IOException {
|
||||
SummaryInformation si = getSummaryInformation();
|
||||
if(si != null) {
|
||||
if (si != null) {
|
||||
writePropertySet(SummaryInformation.DEFAULT_STREAM_NAME, si, outFS);
|
||||
if(writtenEntries != null) {
|
||||
writtenEntries.add(SummaryInformation.DEFAULT_STREAM_NAME);
|
||||
}
|
||||
}
|
||||
DocumentSummaryInformation dsi = getDocumentSummaryInformation();
|
||||
if(dsi != null) {
|
||||
if (dsi != null) {
|
||||
writePropertySet(DocumentSummaryInformation.DEFAULT_STREAM_NAME, dsi, outFS);
|
||||
if(writtenEntries != null) {
|
||||
writtenEntries.add(DocumentSummaryInformation.DEFAULT_STREAM_NAME);
|
||||
@ -235,11 +236,11 @@ public abstract class POIDocument {
|
||||
* @param source is the source POIFS to copy from
|
||||
* @param target is the target POIFS to copy to
|
||||
* @param excepts is a list of Strings specifying what nodes NOT to copy
|
||||
* @deprecated Use {@link EntryUtils#copyNodes(DirectoryEntry, DirectoryEntry, List<String)} instead
|
||||
*/
|
||||
@Deprecated
|
||||
protected void copyNodes( POIFSFileSystem source, POIFSFileSystem target,
|
||||
List<String> excepts ) throws IOException
|
||||
{
|
||||
List<String> excepts ) throws IOException {
|
||||
EntryUtils.copyNodes( source, target, excepts );
|
||||
}
|
||||
|
||||
@ -248,6 +249,7 @@ public abstract class POIDocument {
|
||||
* @param sourceRoot is the source POIFS to copy from
|
||||
* @param targetRoot is the target POIFS to copy to
|
||||
* @param excepts is a list of Strings specifying what nodes NOT to copy
|
||||
* @deprecated Use {@link EntryUtils#copyNodes(DirectoryEntry, DirectoryEntry, List<String)} instead
|
||||
*/
|
||||
@Deprecated
|
||||
protected void copyNodes( DirectoryNode sourceRoot,
|
||||
@ -258,6 +260,7 @@ public abstract class POIDocument {
|
||||
|
||||
/**
|
||||
* Copies an Entry into a target POIFS directory, recursively
|
||||
* @deprecated Use {@link EntryUtils#copyNodeRecursively(Entry, DirectoryEntry)} instead
|
||||
*/
|
||||
@Internal
|
||||
@Deprecated
|
||||
|
Loading…
Reference in New Issue
Block a user