From c7324182ad88401f01c25836a878aa7961f46f28 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Tue, 19 Dec 2023 20:27:49 +0000 Subject: [PATCH] try to javadoc more unsupported methods git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914785 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/poi/poifs/crypt/dsig/SignatureInfo.java | 8 +++++++- .../usermodel/chart/XDDFDataSourcesFactory.java | 4 ++++ .../org/apache/poi/xslf/usermodel/XMLSlideShow.java | 9 ++++++++- .../apache/poi/xslf/usermodel/XSLFGraphicFrame.java | 7 +++++++ .../apache/poi/xslf/usermodel/XSLFGroupShape.java | 8 ++++++++ .../org/apache/poi/xslf/usermodel/XSLFSheet.java | 7 +++++++ .../org/apache/poi/xslf/usermodel/XSLFSlide.java | 13 +++++++++++++ .../org/apache/poi/xssf/streaming/SXSSFRow.java | 13 +++++++++++++ .../org/apache/poi/xssf/streaming/SXSSFSheet.java | 5 +++++ .../apache/poi/xssf/streaming/SXSSFWorkbook.java | 2 ++ .../org/apache/poi/xssf/usermodel/XSSFWorkbook.java | 2 ++ .../org/apache/poi/hemf/record/emf/HemfComment.java | 5 +++++ .../poi/hemf/record/emf/HemfRecordIterator.java | 5 +++++ .../hemf/record/emfplus/HemfPlusRecordIterator.java | 5 +++++ .../apache/poi/hslf/usermodel/HSLFGroupShape.java | 5 +++++ .../poi/hslf/usermodel/HSLFPlaceholderDetails.java | 6 ++++++ .../org/apache/poi/hwpf/model/OldTextPiece.java | 1 + .../org/apache/poi/hwpf/usermodel/TableRow.java | 3 +++ 18 files changed, 106 insertions(+), 2 deletions(-) diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/SignatureInfo.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/SignatureInfo.java index 9d9cccac01..07ae49b4c2 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/SignatureInfo.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/SignatureInfo.java @@ -79,6 +79,7 @@ import org.apache.poi.poifs.crypt.CryptoFunctions; import org.apache.poi.poifs.crypt.HashAlgorithm; import org.apache.poi.poifs.crypt.dsig.facets.SignatureFacet; import org.apache.poi.poifs.crypt.dsig.services.RelationshipTransformService; +import org.apache.poi.util.NotImplemented; import org.apache.xml.security.Init; import org.apache.xml.security.utils.XMLUtils; import org.apache.xmlbeans.XmlOptions; @@ -341,6 +342,12 @@ public class SignatureInfo { return new SignaturePart(sigRelPart, SignatureInfo.this); } + /** + * This method is not yet supported. + * + * @throws UnsupportedOperationException this method is not yet supported + */ + @NotImplemented @Override public void remove() { throw new UnsupportedOperationException(); @@ -348,7 +355,6 @@ public class SignatureInfo { } - /** * Helper method for adding informations before the signing. * Normally {@link #confirmSignature()} is sufficient to be used. diff --git a/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFDataSourcesFactory.java b/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFDataSourcesFactory.java index 68bcc84503..8e89c3620d 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFDataSourcesFactory.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFDataSourcesFactory.java @@ -383,6 +383,10 @@ public class XDDFDataSourcesFactory { return (Number.class.isAssignableFrom(arrayComponentType)); } + /** + * @return the dataRange + * @throws UnsupportedOperationException if there is no Data Range Reference + */ @Override public String getDataRangeReference() { if (dataRange == null) { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java index 77f7c0e61c..e1178470a4 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java @@ -53,6 +53,7 @@ import org.apache.poi.util.IOUtils; import org.apache.poi.util.Internal; import org.apache.poi.util.LittleEndian; import org.apache.poi.util.LittleEndianConsts; +import org.apache.poi.util.NotImplemented; import org.apache.poi.util.Units; import org.apache.xmlbeans.XmlException; import org.openxmlformats.schemas.presentationml.x2006.main.CTNotesMasterIdList; @@ -670,8 +671,14 @@ public class XMLSlideShow extends POIXMLDocument return _tableStyles; } - @SuppressWarnings("RedundantThrows") + /** + * This method is not yet supported. + * + * @throws UnsupportedOperationException this method is not yet supported + */ @Override + @NotImplemented + @SuppressWarnings("RedundantThrows") public MasterSheet createMasterSheet() throws IOException { // TODO: implement! throw new UnsupportedOperationException(); diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFGraphicFrame.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFGraphicFrame.java index c744f2ab73..0738aba408 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFGraphicFrame.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFGraphicFrame.java @@ -37,6 +37,7 @@ import org.apache.poi.openxml4j.opc.PackageRelationship; import org.apache.poi.sl.usermodel.GraphicalFrame; import org.apache.poi.sl.usermodel.ShapeType; import org.apache.poi.util.Beta; +import org.apache.poi.util.NotImplemented; import org.apache.poi.util.Units; import org.apache.xmlbeans.XmlCursor; import org.apache.xmlbeans.XmlException; @@ -60,6 +61,12 @@ public class XSLFGraphicFrame extends XSLFShape implements GraphicalFrame { } } + /** + * This method is not yet supported. + * + * @throws UnsupportedOperationException this method is not yet supported + */ + @NotImplemented @Override + @SuppressWarnings("RedundantThrows") public void addShape(XSLFShape shape) { throw new UnsupportedOperationException( "Adding a shape from a different container is not supported -" diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSheet.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSheet.java index 128fcbd41e..ef1891da2c 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSheet.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSheet.java @@ -53,6 +53,7 @@ import org.apache.poi.sl.usermodel.Sheet; import org.apache.poi.util.Beta; import org.apache.poi.util.IOUtils; import org.apache.poi.util.Internal; +import org.apache.poi.util.NotImplemented; import org.apache.poi.util.Units; import org.apache.poi.xddf.usermodel.chart.XDDFChart; import org.apache.xmlbeans.XmlCursor; @@ -330,6 +331,12 @@ implements XSLFShapeContainer, Sheet { return getShapes().iterator(); } + /** + * This method is not yet supported. + * + * @throws UnsupportedOperationException this method is not yet supported + */ + @NotImplemented @Override public void addShape(XSLFShape shape) { throw new UnsupportedOperationException( diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSlide.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSlide.java index 0b9e6a3212..2e213b9de6 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSlide.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSlide.java @@ -344,11 +344,19 @@ implements Slide { return this; } + /** + * @return always returns false + */ @Override public boolean getFollowMasterBackground() { return false; } + /** + * This method is not yet supported. + * + * @throws UnsupportedOperationException this method is not yet supported + */ @Override @NotImplemented public void setFollowMasterBackground(boolean follow) { @@ -361,6 +369,11 @@ implements Slide { return false; } + /** + * This method is not yet supported. + * + * @throws UnsupportedOperationException this method is not yet supported + */ @Override @NotImplemented public void setFollowMasterColourScheme(boolean follow) { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFRow.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFRow.java index 42f719b52f..0e9a2db55f 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFRow.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFRow.java @@ -485,6 +485,12 @@ public class SXSSFRow implements Row, Comparable { return iter.next(); } + + /** + * This method is not yet supported. + * + * @throws UnsupportedOperationException this method is not yet supported + */ @Override public void remove() { @@ -517,6 +523,13 @@ public class SXSSFRow implements Row, Comparable throw new NoSuchElementException(); } } + + /** + * This method is not yet supported. + * + * @throws UnsupportedOperationException this method is not yet supported + */ + @NotImplemented @Override public void remove() { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java index 73d05fa187..f32ac9bb2c 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java @@ -2172,6 +2172,11 @@ public class SXSSFSheet implements Sheet, OoxmlSheetExtensions { pr.setTabColor(color); } + /** + * This method is not yet supported. + * + * @throws UnsupportedOperationException this method is not yet supported + */ @NotImplemented @Override public void shiftColumns(int startColumn, int endColumn, int n){ diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java index 4483995cfb..84b6fba166 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java @@ -780,6 +780,8 @@ public class SXSSFWorkbook implements Workbook { * Unexpected behavior may occur if sheets are reordered after iterator * has been created. Support for the remove method may be added in the future * if someone can figure out a reliable implementation. + * + * @throws UnsupportedOperationException */ @Override public void remove() throws IllegalStateException { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java index dbf5ab59b9..e43bba7321 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java @@ -1325,6 +1325,8 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Su * Unexpected behavior may occur if sheets are reordered after iterator * has been created. Support for the remove method may be added in the future * if someone can figure out a reliable implementation. + * + * @throws UnsupportedOperationException */ @Override public void remove() throws IllegalStateException { diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emf/HemfComment.java b/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emf/HemfComment.java index 9c4b1bcb85..692bf4ee25 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emf/HemfComment.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emf/HemfComment.java @@ -256,6 +256,11 @@ public class HemfComment { } } + /** + * This method is not yet supported. + * + * @throws UnsupportedOperationException this method is not yet supported + */ @Override public void remove() { throw new UnsupportedOperationException("Remove not supported"); diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emf/HemfRecordIterator.java b/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emf/HemfRecordIterator.java index afdcaa533f..64b4d176ef 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emf/HemfRecordIterator.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emf/HemfRecordIterator.java @@ -91,6 +91,11 @@ public class HemfRecordIterator implements Iterator { return record; } + /** + * This method is not yet supported. + * + * @throws UnsupportedOperationException this method is not yet supported + */ @Override public void remove() { throw new UnsupportedOperationException("Remove not supported"); diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emfplus/HemfPlusRecordIterator.java b/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emfplus/HemfPlusRecordIterator.java index 032ef0a86c..ad076ed130 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emfplus/HemfPlusRecordIterator.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emfplus/HemfPlusRecordIterator.java @@ -94,6 +94,11 @@ public class HemfPlusRecordIterator implements Iterator { return record; } + /** + * This method is not yet supported. + * + * @throws UnsupportedOperationException this method is not yet supported + */ @Override public void remove() { throw new UnsupportedOperationException("Remove not supported"); diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFGroupShape.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFGroupShape.java index a82390e97f..49b2d4bc62 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFGroupShape.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFGroupShape.java @@ -270,6 +270,11 @@ implements HSLFShapeContainer, GroupShape { return getShapes().spliterator(); } + /** + * This method is not yet supported. + * + * @throws UnsupportedOperationException this method is not yet supported + */ @Override public boolean removeShape(HSLFShape shape) { // TODO: implement! diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFPlaceholderDetails.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFPlaceholderDetails.java index 3c279e299f..3957b0fffb 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFPlaceholderDetails.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFPlaceholderDetails.java @@ -91,6 +91,9 @@ public class HSLFPlaceholderDetails implements PlaceholderDetails { return placeholder; } + /** + * @throws UnsupportedOperationException Only sub class(es) of HSLFPlaceholderDetails allow setting the placeholder + */ @Override public void setPlaceholder(Placeholder placeholder) { throw new UnsupportedOperationException("Only sub class(es) of HSLFPlaceholderDetails allow setting the placeholder"); @@ -101,6 +104,9 @@ public class HSLFPlaceholderDetails implements PlaceholderDetails { return PlaceholderSize.full; } + /** + * @throws UnsupportedOperationException Only sub class(es) of HSLFPlaceholderDetails allow setting the placeholder + */ @Override public void setSize(PlaceholderSize size) { throw new UnsupportedOperationException("Only sub class(es) of HSLFPlaceholderDetails allow setting the size"); diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/OldTextPiece.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/OldTextPiece.java index 22289ae954..019580ced8 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/OldTextPiece.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/OldTextPiece.java @@ -76,6 +76,7 @@ public class OldTextPiece extends TextPiece { * * @param start Local start position, in characters * @param end Local end position, in characters + * @throws UnsupportedOperationException always throws UnsupportedOperationException */ @Override @Deprecated diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/TableRow.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/TableRow.java index 9e70662ead..684984ff3c 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/TableRow.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/TableRow.java @@ -63,6 +63,9 @@ public final class TableRow extends Range return _tprops.getFCantSplit(); } + /** + * @throws UnsupportedOperationException not applicable for TableRow + */ public BorderCode getBarBorder() { throw new UnsupportedOperationException( "not applicable for TableRow" ); -- 2.39.5