You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by fa...@apache.org on 2022/09/14 09:54:25 UTC

svn commit: r1904065 - in /poi/trunk: poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/ poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/ poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/ poi-ooxml/src/main/java/org/apache/poi/xwpf/userm...

Author: fanningpj
Date: Wed Sep 14 09:54:24 2022
New Revision: 1904065

URL: http://svn.apache.org/viewvc?rev=1904065&view=rev
Log:
try to use IllegalStateException instead of RuntimeException

Modified:
    poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java
    poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSlideShow.java
    poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/DeferredSXSSFSheet.java
    poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/OpcOutputStream.java
    poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFCell.java
    poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFRow.java
    poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
    poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java
    poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFCell.java
    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
    poi/trunk/poi-ooxml/src/test/java/org/apache/poi/xssf/XSSFTestDataSamples.java
    poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hmef/HMEFMessage.java
    poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShow.java
    poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hsmf/MAPIMessage.java
    poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java
    poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hwmf/usermodel/HwmfPicture.java
    poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hwpf/HWPFDocument.java
    poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFCell.java
    poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFPalette.java
    poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
    poi/trunk/poi/src/main/java/org/apache/poi/ss/format/SimpleFraction.java
    poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/FormulaParseException.java
    poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/OperationEvaluationContext.java
    poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/ErrorEval.java
    poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/OperandResolver.java
    poi/trunk/poi/src/main/java/org/apache/poi/ss/usermodel/WorkbookFactory.java
    poi/trunk/poi/src/main/java/org/apache/poi/util/LittleEndianInputStream.java
    poi/trunk/poi/src/test/java/org/apache/poi/POIDataSamples.java

Modified: poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java?rev=1904065&r1=1904064&r2=1904065&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java (original)
+++ poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java Wed Sep 14 09:54:24 2022
@@ -110,7 +110,7 @@ public class XMLSlideShow extends POIXML
     /**
      * @param pkg OPC package
      * @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
+     * @throws IllegalStateException a number of other runtime exceptions can be thrown, especially if there are problems with the
      * input format
      */
     public XMLSlideShow(OPCPackage pkg) {
@@ -132,7 +132,7 @@ public class XMLSlideShow extends POIXML
      * @param is InputStream
      * @throws IOException If reading data from the stream fails
      * @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
+     * @throws IllegalStateException a number of other runtime exceptions can be thrown, especially if there are problems with the
      * input format
      */
     public XMLSlideShow(InputStream is) throws IOException {
@@ -472,7 +472,7 @@ public class XMLSlideShow extends POIXML
      * @param index The slide number to remove.
      * @return The slide that was removed.
      *
-     * @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
+     * @throws IllegalStateException a number of runtime exceptions can be thrown, especially if there are problems with the
      * input format
      */
     public XSLFSlide removeSlide(int index) {

Modified: poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSlideShow.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSlideShow.java?rev=1904065&r1=1904064&r2=1904065&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSlideShow.java (original)
+++ poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSlideShow.java Wed Sep 14 09:54:24 2022
@@ -236,7 +236,7 @@ public class XSLFSlideShow extends POIXM
         try {
             commentRels = slidePart.getRelationshipsByType(XSLFRelation.COMMENTS.getRelation());
         } catch(InvalidFormatException e) {
-            throw new IllegalStateException(e);
+            throw new IOException(e);
         }
 
         if(commentRels.isEmpty()) {
@@ -244,7 +244,7 @@ public class XSLFSlideShow extends POIXM
             return null;
         }
         if(commentRels.size() > 1) {
-            throw new IllegalStateException("Expecting 0 or 1 comments for a slide, but found " + commentRels.size());
+            throw new IOException("Expecting 0 or 1 comments for a slide, but found " + commentRels.size());
         }
 
         try {
@@ -256,7 +256,7 @@ public class XSLFSlideShow extends POIXM
                 return commDoc.getCmLst();
             }
         } catch(InvalidFormatException e) {
-            throw new IllegalStateException(e);
+            throw new IOException(e);
         }
     }
 

Modified: poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/DeferredSXSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/DeferredSXSSFSheet.java?rev=1904065&r1=1904064&r2=1904065&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/DeferredSXSSFSheet.java (original)
+++ poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/DeferredSXSSFSheet.java Wed Sep 14 09:54:24 2022
@@ -44,7 +44,7 @@ public class DeferredSXSSFSheet extends
     /**
      * Unsupported in DeferredSXSSFSheet
      *
-     * @throws RuntimeException this is unsupported
+     * @throws IllegalStateException this is unsupported
      */
     @Override
     public InputStream getWorksheetXMLInputStream() throws IOException {

Modified: poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/OpcOutputStream.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/OpcOutputStream.java?rev=1904065&r1=1904064&r2=1904065&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/OpcOutputStream.java (original)
+++ poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/OpcOutputStream.java Wed Sep 14 09:54:24 2022
@@ -71,6 +71,7 @@ class OpcOutputStream extends DeflaterOu
     }
 
     /**
+     * @throws IllegalStateException if no entry found
      * @see ZipOutputStream#closeEntry()
      */
     public void closeEntry() throws IOException {

Modified: poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFCell.java?rev=1904065&r1=1904064&r2=1904065&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFCell.java (original)
+++ poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFCell.java Wed Sep 14 09:54:24 2022
@@ -139,6 +139,7 @@ public class SXSSFCell extends CellBase
      * @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING},
      *     {@link CellType#BOOLEAN}, {@link CellType#ERROR}) depending
      * on the cached value of the formula
+     * @throws IllegalStateException if cell is not a formula cell
      */
     @Override
     public CellType getCachedFormulaResultType() {
@@ -253,7 +254,7 @@ public class SXSSFCell extends CellBase
                     _value = new ErrorFormulaValue(formula, getErrorCellValue());
                     break;
                 default:
-                    throw new IllegalStateException("Cannot set a formula for a cell of type " + getCellType());
+                    throw new FormulaParseException("Cannot set a formula for a cell of type " + getCellType());
             }
         }
     }

Modified: poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFRow.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFRow.java?rev=1904065&r1=1904064&r2=1904065&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFRow.java (original)
+++ poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFRow.java Wed Sep 14 09:54:24 2022
@@ -146,7 +146,7 @@ public class SXSSFRow implements Row, Co
     }
 
     /**
-     * @throws RuntimeException if the bounds are exceeded.
+     * @throws IllegalStateException if the bounds are exceeded.
      */
     private static void checkBounds(int cellIndex) {
         SpreadsheetVersion v = SpreadsheetVersion.EXCEL2007;
@@ -219,7 +219,7 @@ public class SXSSFRow implements Row, Co
      * @param cellnum  0 based column number
      * @return Cell representing that column or null if undefined.
      * @see #getCell(int, org.apache.poi.ss.usermodel.Row.MissingCellPolicy)
-     * @throws RuntimeException if cellnum is out of bounds
+     * @throws IllegalStateException if cellnum is out of bounds
      */
     @Override
     public SXSSFCell getCell(int cellnum) {

Modified: poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java?rev=1904065&r1=1904064&r2=1904065&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java (original)
+++ poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java Wed Sep 14 09:54:24 2022
@@ -1353,7 +1353,7 @@ public class SXSSFSheet implements Sheet
      *
      * @param row   start row of a groupped range of rows (0-based)
      * @param collapse whether to expand/collapse the detail rows
-     * @throws RuntimeException if collapse is false as this is not implemented for SXSSF.
+     * @throws IllegalStateException if collapse is false as this is not implemented for SXSSF.
      */
     @Override
     public void setRowGroupCollapsed(int row, boolean collapse) {

Modified: poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java?rev=1904065&r1=1904064&r2=1904065&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java (original)
+++ poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java Wed Sep 14 09:54:24 2022
@@ -1315,7 +1315,7 @@ public class SXSSFWorkbook implements Wo
      * @param name The name the workbook will be referenced as in formulas
      * @param workbook The open workbook to fetch the link required information from
      *
-     * @throws RuntimeException stating that this method is not implemented yet.
+     * @throws IllegalStateException stating that this method is not implemented yet.
      */
     @Override
     @NotImplemented

Modified: poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFCell.java?rev=1904065&r1=1904064&r2=1904065&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFCell.java (original)
+++ poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFCell.java Wed Sep 14 09:54:24 2022
@@ -988,7 +988,7 @@ public final class XSSFCell extends Cell
     }
 
     /**
-     * @throws RuntimeException if the bounds are exceeded.
+     * @throws IllegalStateException if the bounds are exceeded.
      */
     private static void checkBounds(int cellIndex) {
         SpreadsheetVersion v = SpreadsheetVersion.EXCEL2007;

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=1904065&r1=1904064&r2=1904065&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 Wed Sep 14 09:54:24 2022
@@ -247,7 +247,7 @@ public class XSSFWorkbook extends POIXML
      * @param pkg the OpenXML4J {@code OPC Package} object.
      * @throws IOException If reading data from the package fails
      * @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
+     * @throws IllegalStateException a number of other runtime exceptions can be thrown, especially if there are problems with the
      * input format
      */
     public XSSFWorkbook(OPCPackage pkg) throws IOException {
@@ -279,7 +279,7 @@ public class XSSFWorkbook extends POIXML
      *
      * @throws IOException If reading data from the stream fails
      * @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
+     * @throws IllegalStateException a number of other runtime exceptions can be thrown, especially if there are problems with the
      * input format
      */
     public XSSFWorkbook(InputStream is) throws IOException {
@@ -304,7 +304,7 @@ public class XSSFWorkbook extends POIXML
      * @throws IOException If reading data from the file fails
      * @throws InvalidFormatException If the file has a format that cannot be read or if the file is corrupted
      * @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
+     * @throws IllegalStateException 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 {
@@ -325,7 +325,7 @@ public class XSSFWorkbook extends POIXML
      * @param path   the file name.
      * @throws IOException If reading data from the file fails
      * @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
+     * @throws IllegalStateException a number of other runtime exceptions can be thrown, especially if there are problems with the
      * input format
      *
      */
@@ -338,7 +338,7 @@ public class XSSFWorkbook extends POIXML
      * @param part  package part
      * @throws IOException If reading data from the Package Part fails
      * @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
+     * @throws IllegalStateException a number of other runtime exceptions can be thrown, especially if there are problems with the
      * input format
      * @since POI 4.0.0
      */
@@ -455,7 +455,7 @@ public class XSSFWorkbook extends POIXML
      * 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
+     * @throws IllegalStateException 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) {

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=1904065&r1=1904064&r2=1904065&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 Wed Sep 14 09:54:24 2022
@@ -136,7 +136,7 @@ public class XWPFDocument extends POIXML
      * @param pkg OPC package
      * @throws IOException If reading data from the package fails
      * @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
+     * @throws IllegalStateException a number of other runtime exceptions can be thrown, especially if there are problems with the
      * input format
      */
     public XWPFDocument(OPCPackage pkg) throws IOException {
@@ -150,7 +150,7 @@ public class XWPFDocument extends POIXML
      * @param is The InputStream to read data from
      * @throws IOException If reading data from the stream fails
      * @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
+     * @throws IllegalStateException a number of other runtime exceptions can be thrown, especially if there are problems with the
      * input format
      */
     public XWPFDocument(InputStream is) throws IOException {

Modified: poi/trunk/poi-ooxml/src/test/java/org/apache/poi/xssf/XSSFTestDataSamples.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/test/java/org/apache/poi/xssf/XSSFTestDataSamples.java?rev=1904065&r1=1904064&r2=1904065&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/src/test/java/org/apache/poi/xssf/XSSFTestDataSamples.java (original)
+++ poi/trunk/poi-ooxml/src/test/java/org/apache/poi/xssf/XSSFTestDataSamples.java Wed Sep 14 09:54:24 2022
@@ -139,7 +139,7 @@ public class XSSFTestDataSamples {
      * @param wb The workbook to write out, it is closed after the call.
      * @param testName file name to be used to write to a file. This file will be cleaned up by a call to readBack(String)
      * @return workbook location
-     * @throws RuntimeException if {@link #TEST_OUTPUT_DIR} System property is not set
+     * @throws IllegalStateException if {@link #TEST_OUTPUT_DIR} System property is not set
      */
     public static <R extends Workbook> File writeOutAndClose(R wb, String testName) {
         try {
@@ -160,7 +160,7 @@ public class XSSFTestDataSamples {
      *
      * @param wb the workbook to write
      * @return the memory buffer
-     * @throws RuntimeException If writing the file fails
+     * @throws IllegalStateException If writing the file fails
      */
     public static <R extends Workbook> UnsynchronizedByteArrayOutputStream writeOutAndClose(R wb) throws IOException {
         UnsynchronizedByteArrayOutputStream out = writeOut(wb);

Modified: poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hmef/HMEFMessage.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hmef/HMEFMessage.java?rev=1904065&r1=1904064&r2=1904065&view=diff
==============================================================================
--- poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hmef/HMEFMessage.java (original)
+++ poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hmef/HMEFMessage.java Wed Sep 14 09:54:24 2022
@@ -51,7 +51,7 @@ public final class HMEFMessage {
     /**
      * @param inp input stream
      * @throws IOException If reading data from the stream fails
-     * @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
+     * @throws IllegalStateException a number of runtime exceptions can be thrown, especially if there are problems with the
      * input format
      */
     public HMEFMessage(InputStream inp) throws IOException {

Modified: poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShow.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShow.java?rev=1904065&r1=1904064&r2=1904065&view=diff
==============================================================================
--- poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShow.java (original)
+++ poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShow.java Wed Sep 14 09:54:24 2022
@@ -167,7 +167,7 @@ public final class HSLFSlideShow extends
     /**
      * Constructs a Powerpoint document from an input stream.
      * @throws IOException If reading data from the stream fails
-     * @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
+     * @throws IllegalStateException a number of runtime exceptions can be thrown, especially if there are problems with the
      * input format
      */
     @SuppressWarnings("resource")
@@ -178,7 +178,7 @@ public final class HSLFSlideShow extends
     /**
      * Constructs a Powerpoint document from an POIFSFileSystem.
      * @throws IOException If reading data from the file-system fails
-     * @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
+     * @throws IllegalStateException a number of runtime exceptions can be thrown, especially if there are problems with the
      * input format
      */
     @SuppressWarnings("resource")
@@ -189,7 +189,7 @@ public final class HSLFSlideShow extends
     /**
      * Constructs a Powerpoint document from an DirectoryNode.
      * @throws IOException If reading data from the DirectoryNode fails
-     * @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
+     * @throws IllegalStateException a number of runtime exceptions can be thrown, especially if there are problems with the
      * input format
      */
     @SuppressWarnings("resource")

Modified: poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hsmf/MAPIMessage.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hsmf/MAPIMessage.java?rev=1904065&r1=1904064&r2=1904065&view=diff
==============================================================================
--- poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hsmf/MAPIMessage.java (original)
+++ poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hsmf/MAPIMessage.java Wed Sep 14 09:54:24 2022
@@ -110,7 +110,7 @@ public class MAPIMessage extends POIRead
      *
      * @param filename Name of the file to read
      * @throws IOException      on errors reading, or invalid data
-     * @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
+     * @throws IllegalStateException a number of runtime exceptions can be thrown, especially if there are problems with the
      *                          input format
      */
     public MAPIMessage(String filename) throws IOException {
@@ -122,7 +122,7 @@ public class MAPIMessage extends POIRead
      *
      * @param file The file to read from
      * @throws IOException      on errors reading, or invalid data
-     * @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
+     * @throws IllegalStateException a number of runtime exceptions can be thrown, especially if there are problems with the
      *                          input format
      */
     public MAPIMessage(File file) throws IOException {
@@ -137,7 +137,7 @@ public class MAPIMessage extends POIRead
      *
      * @param in The InputStream to buffer and then read from
      * @throws IOException      on errors reading, or invalid data
-     * @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
+     * @throws IllegalStateException a number of runtime exceptions can be thrown, especially if there are problems with the
      *                          input format
      */
     public MAPIMessage(InputStream in) throws IOException {
@@ -149,7 +149,7 @@ public class MAPIMessage extends POIRead
      *
      * @param fs Open POIFS FileSystem containing the message
      * @throws IOException      on errors reading, or invalid data
-     * @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
+     * @throws IllegalStateException a number of runtime exceptions can be thrown, especially if there are problems with the
      *                          input format
      */
     public MAPIMessage(POIFSFileSystem fs) throws IOException {
@@ -162,7 +162,7 @@ public class MAPIMessage extends POIRead
      *
      * @param poifsDir Directory containing the message
      * @throws IOException      on errors reading, or invalid data
-     * @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
+     * @throws IllegalStateException a number of runtime exceptions can be thrown, especially if there are problems with the
      *                          input format
      */
     public MAPIMessage(DirectoryNode poifsDir) throws IOException {

Modified: poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java?rev=1904065&r1=1904064&r2=1904065&view=diff
==============================================================================
--- poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java (original)
+++ poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java Wed Sep 14 09:54:24 2022
@@ -104,7 +104,7 @@ public class ExcelToHtmlConverter extend
      * @return DOM representation of result HTML
      * @throws IOException                  If an error occurs reading or writing files
      * @throws ParserConfigurationException If configuration is incorrect
-     * @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
+     * @throws IllegalStateException a number of runtime exceptions can be thrown, especially if there are problems with the
      * input format
      */
     public static Document process(File xlsFile) throws IOException, ParserConfigurationException {
@@ -120,7 +120,7 @@ public class ExcelToHtmlConverter extend
      * @return DOM representation of result HTML
      * @throws IOException                  If an error occurs reading or writing files
      * @throws ParserConfigurationException If configuration is incorrect
-     * @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
+     * @throws IllegalStateException a number of runtime exceptions can be thrown, especially if there are problems with the
      * input format
      */
     public static Document process(InputStream xlsStream) throws IOException, ParserConfigurationException {
@@ -136,7 +136,7 @@ public class ExcelToHtmlConverter extend
      * @return DOM representation of result HTML
      * @throws IOException                  If an error occurs reading or writing files
      * @throws ParserConfigurationException If configuration is incorrect
-     * @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
+     * @throws IllegalStateException a number of runtime exceptions can be thrown, especially if there are problems with the
      * input format
      */
     public static Document process(HSSFWorkbook workbook) throws IOException, ParserConfigurationException {

Modified: poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hwmf/usermodel/HwmfPicture.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hwmf/usermodel/HwmfPicture.java?rev=1904065&r1=1904064&r2=1904065&view=diff
==============================================================================
--- poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hwmf/usermodel/HwmfPicture.java (original)
+++ poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hwmf/usermodel/HwmfPicture.java Wed Sep 14 09:54:24 2022
@@ -83,7 +83,7 @@ public class HwmfPicture implements Iter
     /**
      * @param inputStream The InputStream to read data from
      * @throws IOException If reading data from the file fails
-     * @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
+     * @throws IllegalStateException a number of runtime exceptions can be thrown, especially if there are problems with the
      * input format
      */
     public HwmfPicture(InputStream inputStream) throws IOException {
@@ -198,7 +198,7 @@ public class HwmfPicture implements Iter
      *
      * @return the bounding box
      *
-     * @throws RuntimeException if neither WmfSetWindowOrg/Ext nor the placeableHeader are set
+     * @throws IllegalStateException if neither WmfSetWindowOrg/Ext nor the placeableHeader are set
      */
     public Rectangle2D getBounds() {
         if (placeableHeader != null) {

Modified: poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hwpf/HWPFDocument.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hwpf/HWPFDocument.java?rev=1904065&r1=1904064&r2=1904065&view=diff
==============================================================================
--- poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hwpf/HWPFDocument.java (original)
+++ poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hwpf/HWPFDocument.java Wed Sep 14 09:54:24 2022
@@ -215,7 +215,7 @@ public final class HWPFDocument extends
      * @throws IOException If there is an unexpected IOException from the passed
      *                     in InputStream.
      * @throws org.apache.poi.EmptyFileException If the given stream is empty
-     * @throws RuntimeException a number of other runtime exceptions can be thrown, especially if there are problems with the
+     * @throws IllegalStateException a number of other runtime exceptions can be thrown, especially if there are problems with the
      * input format
      */
     public HWPFDocument(InputStream istream) throws IOException {
@@ -229,7 +229,7 @@ public final class HWPFDocument extends
      * @param pfilesystem The POIFSFileSystem that contains the Word document.
      * @throws IOException If there is an unexpected IOException from the passed
      *                     in POIFSFileSystem.
-     * @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
+     * @throws IllegalStateException a number of runtime exceptions can be thrown, especially if there are problems with the
      * input format
      */
     public HWPFDocument(POIFSFileSystem pfilesystem) throws IOException {
@@ -244,7 +244,7 @@ public final class HWPFDocument extends
      * @param directory The DirectoryNode that contains the Word document.
      * @throws IOException If there is an unexpected IOException from the passed
      *                     in POIFSFileSystem.
-     * @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
+     * @throws IllegalStateException a number of runtime exceptions can be thrown, especially if there are problems with the
      * input format
      */
     public HWPFDocument(DirectoryNode directory) throws IOException {

Modified: poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFCell.java?rev=1904065&r1=1904064&r2=1904065&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFCell.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFCell.java Wed Sep 14 09:54:24 2022
@@ -1002,7 +1002,7 @@ public class HSSFCell extends CellBase {
     }
 
     /**
-     * @throws RuntimeException if the bounds are exceeded.
+     * @throws IllegalStateException if the bounds are exceeded.
      */
     private static void checkBounds(int cellIndex) {
         if (cellIndex < 0 || cellIndex > LAST_COLUMN_NUMBER) {

Modified: poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFPalette.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFPalette.java?rev=1904065&r1=1904064&r2=1904065&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFPalette.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFPalette.java Wed Sep 14 09:54:24 2022
@@ -159,7 +159,7 @@ public final class HSSFPalette {
      *
      * @return  The new custom color.
      *
-     * @throws RuntimeException if there are more more free color indexes.
+     * @throws IllegalStateException if there are more more free color indexes.
      */
     public HSSFColor addColor( byte red, byte green, byte blue )
     {

Modified: poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java?rev=1904065&r1=1904064&r2=1904065&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java Wed Sep 14 09:54:24 2022
@@ -256,7 +256,7 @@ public final class HSSFWorkbook extends
      * preserve nodes set to true.
      *
      * @throws IOException if the stream cannot be read
-     * @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
+     * @throws IllegalStateException a number of runtime exceptions can be thrown, especially if there are problems with the
      * input format
      * @see #HSSFWorkbook(POIFSFileSystem, boolean)
      * @see POIFSFileSystem
@@ -275,7 +275,7 @@ public final class HSSFWorkbook extends
      *                      need to. If set, will store all of the POIFSFileSystem
      *                      in memory
      * @throws IOException if the stream cannot be read
-     * @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
+     * @throws IllegalStateException a number of runtime exceptions can be thrown, especially if there are problems with the
      * input format
      * @see POIFSFileSystem
      */
@@ -324,7 +324,7 @@ public final class HSSFWorkbook extends
      *                      need to. If set, will store all of the POIFSFileSystem
      *                      in memory
      * @throws IOException if the stream cannot be read
-     * @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
+     * @throws IllegalStateException a number of runtime exceptions can be thrown, especially if there are problems with the
      * input format
      * @see POIFSFileSystem
      */
@@ -344,7 +344,7 @@ public final class HSSFWorkbook extends
      *                      need to. If set, will store all of the POIFSFileSystem
      *                      in memory
      * @throws IOException if the stream cannot be read
-     * @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
+     * @throws IllegalStateException a number of runtime exceptions can be thrown, especially if there are problems with the
      * input format
      * @see POIFSFileSystem
      */
@@ -401,7 +401,7 @@ public final class HSSFWorkbook extends
      * preserve nodes set to true.
      *
      * @throws IOException if the stream cannot be read
-     * @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
+     * @throws IllegalStateException a number of runtime exceptions can be thrown, especially if there are problems with the
      * input format
      * @see #HSSFWorkbook(InputStream, boolean)
      * @see #HSSFWorkbook(POIFSFileSystem)
@@ -420,7 +420,7 @@ public final class HSSFWorkbook extends
      *                      macros.  This takes more memory, so only say yes if you
      *                      need to.
      * @throws IOException if the stream cannot be read
-     * @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
+     * @throws IllegalStateException a number of runtime exceptions can be thrown, especially if there are problems with the
      * input format
      * @see POIFSFileSystem
      * @see #HSSFWorkbook(POIFSFileSystem)

Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/format/SimpleFraction.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/format/SimpleFraction.java?rev=1904065&r1=1904064&r2=1904065&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/format/SimpleFraction.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/format/SimpleFraction.java Wed Sep 14 09:54:24 2022
@@ -43,7 +43,7 @@ public class SimpleFraction {
      * @param value the double value to convert to a fraction.
      * @param maxDenominator maximum denominator value allowed.
      *
-     * @throws RuntimeException if the continued fraction failed to
+     * @throws IllegalStateException if the continued fraction failed to
      *      converge.
      * @throws IllegalArgumentException if value &gt; Integer.MAX_VALUE
      */
@@ -68,7 +68,7 @@ public class SimpleFraction {
      *        {@code epsilon} of {@code value}, in absolute terms.
      * @param maxDenominator maximum denominator value allowed.
      * @param maxIterations maximum number of convergents
-     * @throws RuntimeException if the continued fraction failed to
+     * @throws IllegalStateException if the continued fraction failed to
      *         converge.
      * @throws IllegalArgumentException if value > Integer.MAX_VALUE
      */

Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/FormulaParseException.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/FormulaParseException.java?rev=1904065&r1=1904064&r2=1904065&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/FormulaParseException.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/FormulaParseException.java Wed Sep 14 09:54:24 2022
@@ -25,7 +25,7 @@ package org.apache.poi.ss.formula;
  */
 public final class FormulaParseException extends RuntimeException {
 
-    FormulaParseException(String msg) {
+    public FormulaParseException(String msg) {
         super(msg);
     }
 }

Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/OperationEvaluationContext.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/OperationEvaluationContext.java?rev=1904065&r1=1904064&r2=1904065&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/OperationEvaluationContext.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/OperationEvaluationContext.java Wed Sep 14 09:54:24 2022
@@ -208,7 +208,7 @@ public final class OperationEvaluationCo
      * @param isA1Style    specifies the format for {@code refStrPart1} and {@code refStrPart2}.
      *                     Pass {@code true} for 'A1' style and {@code false} for 'R1C1' style.
      * @return a {@link RefEval} or {@link AreaEval}
-     * @throws RuntimeException If invalid parameters are provided
+     * @throws IllegalStateException If invalid parameters are provided
      */
     public ValueEval getDynamicReference(String workbookName, String sheetName, String refStrPart1,
                                          String refStrPart2, boolean isA1Style) {

Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/ErrorEval.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/ErrorEval.java?rev=1904065&r1=1904064&r2=1904065&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/ErrorEval.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/ErrorEval.java Wed Sep 14 09:54:24 2022
@@ -52,7 +52,7 @@ public final class ErrorEval implements
     /**
      * Translates an Excel internal error code into the corresponding POI ErrorEval instance
      * @param errorCode An error code listed in {@link FormulaError}
-     * @throws RuntimeException If an unknown errorCode is specified
+     * @throws IllegalStateException If an unknown errorCode is specified
      */
     public static ErrorEval valueOf(int errorCode) {
         FormulaError error = FormulaError.forInt(errorCode);

Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/OperandResolver.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/OperandResolver.java?rev=1904065&r1=1904064&r2=1904065&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/OperandResolver.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/OperandResolver.java Wed Sep 14 09:54:24 2022
@@ -246,7 +246,7 @@ public final class OperandResolver {
      * @return actual, parsed or interpreted double value (respectively).
      * @throws EvaluationException if a StringEval is supplied and cannot be parsed
      * as a double (See {@code parseDouble()} for allowable formats).
-     * @throws RuntimeException if the supplied parameter is not {@link NumberEval},
+     * @throws IllegalStateException if the supplied parameter is not {@link NumberEval},
      * {@link StringEval}, {@link BoolEval} or {@link BlankEval}
      */
     public static double coerceValueToDouble(ValueEval ev) throws EvaluationException {

Modified: poi/trunk/poi/src/main/java/org/apache/poi/ss/usermodel/WorkbookFactory.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/usermodel/WorkbookFactory.java?rev=1904065&r1=1904064&r2=1904065&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/ss/usermodel/WorkbookFactory.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/ss/usermodel/WorkbookFactory.java Wed Sep 14 09:54:24 2022
@@ -67,7 +67,7 @@ public final class WorkbookFactory {
      * @return The created workbook
      *
      * @throws IOException if an error occurs while creating the objects
-     * @throws RuntimeException a number of other runtime exceptions can be thrown, especially if there are problems with the
+     * @throws IllegalStateException a number of other runtime exceptions can be thrown, especially if there are problems with the
      * input format
      */
     public static Workbook create(boolean xssf) throws IOException {
@@ -85,7 +85,7 @@ public final class WorkbookFactory {
      * @return The created workbook
      *
      * @throws IOException if an error occurs while reading the data
-     * @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
+     * @throws IllegalStateException a number of runtime exceptions can be thrown, especially if there are problems with the
      * input format
      */
     public static Workbook create(POIFSFileSystem fs) throws IOException {
@@ -105,7 +105,7 @@ public final class WorkbookFactory {
      *  @return The created Workbook
      *
      *  @throws IOException if an error occurs while reading the data
-     *  @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
+     *  @throws IllegalStateException a number of runtime exceptions can be thrown, especially if there are problems with the
      *  input format
      */
     private static Workbook create(final POIFSFileSystem fs, String password) throws IOException {
@@ -124,7 +124,7 @@ public final class WorkbookFactory {
      * @return The created Workbook
      *
      * @throws IOException if an error occurs while reading the data
-     * @throws RuntimeException a number of other exceptions can be thrown, especially if there are problems with the
+     * @throws IllegalStateException a number of other exceptions can be thrown, especially if there are problems with the
      * input format
      */
     public static Workbook create(final DirectoryNode root) throws IOException {
@@ -145,7 +145,7 @@ public final class WorkbookFactory {
      * @return The created Workbook
      *
      * @throws IOException if an error occurs while reading the data
-     * @throws RuntimeException a number of runtime exceptions can be thrown, especially if there are problems with the
+     * @throws IllegalStateException a number of runtime exceptions can be thrown, especially if there are problems with the
      * input format
      */
     public static Workbook create(final DirectoryNode root, String password) throws IOException {
@@ -178,7 +178,7 @@ public final class WorkbookFactory {
      *  @throws IOException if an error occurs while reading the data
      *  @throws EncryptedDocumentException If the Workbook given is password protected
      *  @throws EmptyFileException If the given data is empty
-     *  @throws RuntimeException a number of other runtime exceptions can be thrown, especially if there are problems with the
+     *  @throws IllegalStateException a number of other runtime exceptions can be thrown, especially if there are problems with the
      *  input format
      */
     public static Workbook create(InputStream inp) throws IOException, EncryptedDocumentException {
@@ -207,7 +207,7 @@ public final class WorkbookFactory {
      *  @throws IOException if an error occurs while reading the data
      *  @throws EncryptedDocumentException If the wrong password is given for a protected file
      *  @throws EmptyFileException If the given data is empty
-     *  @throws RuntimeException a number of other runtime exceptions can be thrown, especially if there are problems with the
+     *  @throws IllegalStateException a number of other runtime exceptions can be thrown, especially if there are problems with the
      *  input format
      */
     public static Workbook create(InputStream inp, String password) throws IOException, EncryptedDocumentException {
@@ -248,7 +248,7 @@ public final class WorkbookFactory {
      *  @throws IOException if an error occurs while reading the data
      *  @throws EncryptedDocumentException If the Workbook given is password protected
      *  @throws EmptyFileException If the given data is empty
-     *  @throws RuntimeException a number of other runtime exceptions can be thrown, especially if there are problems with the
+     *  @throws IllegalStateException a number of other runtime exceptions can be thrown, especially if there are problems with the
      *  input format
      */
     public static Workbook create(File file) throws IOException, EncryptedDocumentException {
@@ -270,7 +270,7 @@ public final class WorkbookFactory {
      *  @throws IOException if an error occurs while reading the data
      *  @throws EncryptedDocumentException If the wrong password is given for a protected file
      *  @throws EmptyFileException If the given data is empty
-     *  @throws RuntimeException a number of other runtime exceptions can be thrown, especially if there are problems with the
+     *  @throws IllegalStateException a number of other runtime exceptions can be thrown, especially if there are problems with the
      *  input format
      */
     public static Workbook create(File file, String password) throws IOException, EncryptedDocumentException {
@@ -294,7 +294,7 @@ public final class WorkbookFactory {
      *  @throws IOException if an error occurs while reading the data
      *  @throws EncryptedDocumentException If the wrong password is given for a protected file
      *  @throws EmptyFileException If the given data is empty
-     *  @throws RuntimeException a number of other runtime exceptions can be thrown, especially if there are problems with the
+     *  @throws IllegalStateException a number of other runtime exceptions can be thrown, especially if there are problems with the
      *  input format
      */
     public static Workbook create(File file, String password, boolean readOnly) throws IOException, EncryptedDocumentException {

Modified: poi/trunk/poi/src/main/java/org/apache/poi/util/LittleEndianInputStream.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/util/LittleEndianInputStream.java?rev=1904065&r1=1904064&r2=1904065&view=diff
==============================================================================
--- poi/trunk/poi/src/main/java/org/apache/poi/util/LittleEndianInputStream.java (original)
+++ poi/trunk/poi/src/main/java/org/apache/poi/util/LittleEndianInputStream.java Wed Sep 14 09:54:24 2022
@@ -97,7 +97,7 @@ public class LittleEndianInputStream ext
      * get an unsigned int value from an InputStream
      *
      * @return the unsigned int (32-bit) value
-     * @throws RuntimeException
+     * @throws IllegalStateException
      *                wraps any IOException thrown from reading the stream.
      */
     //@Override

Modified: poi/trunk/poi/src/test/java/org/apache/poi/POIDataSamples.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi/src/test/java/org/apache/poi/POIDataSamples.java?rev=1904065&r1=1904064&r2=1904065&view=diff
==============================================================================
--- poi/trunk/poi/src/test/java/org/apache/poi/POIDataSamples.java (original)
+++ poi/trunk/poi/src/test/java/org/apache/poi/POIDataSamples.java Wed Sep 14 09:54:24 2022
@@ -160,7 +160,7 @@ public final class POIDataSamples {
      *
      * @param sampleFileName    the name of the test file
      * @return Verifies that the file with the given name exists in the test-data directory
-     * @throws RuntimeException if the file was not found
+     * @throws IllegalStateException if the file was not found
      */
     public File getFile(String sampleFileName) {
         File f = new File(_resolvedDataDir, sampleFileName);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org