Author: fanningpj
Date: Mon Dec 13 17:31:53 2021
New Revision: 1895910

URL: http://svn.apache.org/viewvc?rev=1895910&view=rev
Log:
highlight some exceptions

Modified:
    
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java
    
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java

Modified: 
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java?rev=1895910&r1=1895909&r2=1895910&view=diff
==============================================================================
--- 
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java
 (original)
+++ 
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java
 Mon Dec 13 17:31:53 2021
@@ -258,6 +258,10 @@ public class XSSFWorkbook extends POIXML
      *  footprint than an InputStream backed one.
      *
      * @param pkg the OpenXML4J {@code OPC Package} object.
+     * @throws IOException
+     * @throws POIXMLException a RuntimeException that can be caused by 
invalid OOXML data
+     * @throws RuntimeException a number of other runtime exceptions can be 
thrown, especially if there are problems with the
+     * input format
      */
     public XSSFWorkbook(OPCPackage pkg) throws IOException {
         super(pkg);
@@ -285,6 +289,11 @@ public class XSSFWorkbook extends POIXML
      *       ......
      *       pkg.close(); // gracefully closes the underlying zip file
      *   }</pre>
+     *
+     * @throws IOException
+     * @throws POIXMLException a RuntimeException that can be caused by 
invalid OOXML data
+     * @throws RuntimeException a number of other runtime exceptions can be 
thrown, especially if there are problems with the
+     * input format
      */
     public XSSFWorkbook(InputStream is) throws IOException {
         this(PackageHelper.open(is));
@@ -301,6 +310,11 @@ public class XSSFWorkbook extends POIXML
      *  than opening from an InputStream
      *
      * @param file   the file to open
+     * @throws IOException
+     * @throws InvalidFormatException
+     * @throws POIXMLException a RuntimeException that can be caused by 
invalid OOXML data
+     * @throws RuntimeException a number of other runtime exceptions can be 
thrown, especially if there are problems with the
+     * input format
      */
     public XSSFWorkbook(File file) throws IOException, InvalidFormatException {
         this(OPCPackage.open(file));
@@ -318,6 +332,11 @@ public class XSSFWorkbook extends POIXML
      *  than opening from an InputStream
      *
      * @param path   the file name.
+     * @throws IOException
+     * @throws POIXMLException a RuntimeException that can be caused by 
invalid OOXML data
+     * @throws RuntimeException a number of other runtime exceptions can be 
thrown, especially if there are problems with the
+     * input format
+     *
      */
     public XSSFWorkbook(String path) throws IOException {
         this(openPackage(path));
@@ -326,6 +345,10 @@ public class XSSFWorkbook extends POIXML
     /**
      * Constructs a XSSFWorkbook object using Package Part.
      * @param part  package part
+     * @throws IOException
+     * @throws POIXMLException a RuntimeException that can be caused by 
invalid OOXML data
+     * @throws RuntimeException a number of other runtime exceptions can be 
thrown, especially if there are problems with the
+     * input format
      * @since POI 4.0.0
      */
     public XSSFWorkbook(PackagePart part) throws IOException {
@@ -437,6 +460,10 @@ public class XSSFWorkbook extends POIXML
     /**
      * Not normally to be called externally, but possibly to be overridden to 
avoid
      * the DOM based parse of large sheets (see examples).
+     *
+     * @throws POIXMLException a RuntimeException that can be caused by 
invalid OOXML data
+     * @throws RuntimeException a number of other runtime exceptions can be 
thrown, especially if there are problems with the
+     * input format
      */
     public void parseSheet(Map<String, XSSFSheet> shIdMap, CTSheet ctSheet) {
         XSSFSheet sh = shIdMap.get(ctSheet.getId());

Modified: 
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java?rev=1895910&r1=1895909&r2=1895910&view=diff
==============================================================================
--- 
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java
 (original)
+++ 
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java
 Mon Dec 13 17:31:53 2021
@@ -130,6 +130,13 @@ public class XWPFDocument extends POIXML
      */
     private XWPFHeaderFooterPolicy headerFooterPolicy;
 
+    /**
+     * @param pkg OPC package
+     * @throws IOException
+     * @throws POIXMLException a RuntimeException that can be caused by 
invalid OOXML data
+     * @throws RuntimeException a number of other runtime exceptions can be 
thrown, especially if there are problems with the
+     * input format
+     */
     public XWPFDocument(OPCPackage pkg) throws IOException {
         super(pkg);
 
@@ -137,6 +144,13 @@ public class XWPFDocument extends POIXML
         load(XWPFFactory.getInstance());
     }
 
+    /**
+     * @param is InputStream
+     * @throws IOException
+     * @throws POIXMLException a RuntimeException that can be caused by 
invalid OOXML data
+     * @throws RuntimeException a number of other runtime exceptions can be 
thrown, especially if there are problems with the
+     * input format
+     */
     public XWPFDocument(InputStream is) throws IOException {
         super(PackageHelper.open(is));
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to