diff options
author | PJ Fanning <fanningpj@apache.org> | 2022-09-14 09:54:24 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2022-09-14 09:54:24 +0000 |
commit | 6e7f6dad21f8b618abb7c3af331c83629a785150 (patch) | |
tree | 1f77419bba8910953ac1a14ed81e0f482234f955 /poi-scratchpad | |
parent | 1e50886b5424de56d6fae60f3b64ccba4003eeaf (diff) | |
download | poi-6e7f6dad21f8b618abb7c3af331c83629a785150.tar.gz poi-6e7f6dad21f8b618abb7c3af331c83629a785150.zip |
try to use IllegalStateException instead of RuntimeException
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904065 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-scratchpad')
6 files changed, 17 insertions, 17 deletions
diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hmef/HMEFMessage.java b/poi-scratchpad/src/main/java/org/apache/poi/hmef/HMEFMessage.java index 6788be2403..26f5238310 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hmef/HMEFMessage.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hmef/HMEFMessage.java @@ -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 { diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShow.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShow.java index fa4cf6c795..54438d7bb7 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShow.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShow.java @@ -167,7 +167,7 @@ public final class HSLFSlideShow extends POIDocument implements SlideShow<HSLFSh /** * 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 POIDocument implements SlideShow<HSLFSh /** * 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 POIDocument implements SlideShow<HSLFSh /** * 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") diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hsmf/MAPIMessage.java b/poi-scratchpad/src/main/java/org/apache/poi/hsmf/MAPIMessage.java index 52a0a962c3..2c0d96303a 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hsmf/MAPIMessage.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hsmf/MAPIMessage.java @@ -110,7 +110,7 @@ public class MAPIMessage extends POIReadOnlyDocument { * * @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 POIReadOnlyDocument { * * @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 POIReadOnlyDocument { * * @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 POIReadOnlyDocument { * * @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 POIReadOnlyDocument { * * @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 { diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java b/poi-scratchpad/src/main/java/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java index 36e8b5983e..e483bd8c96 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java @@ -104,7 +104,7 @@ public class ExcelToHtmlConverter extends AbstractExcelConverter { * @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 extends AbstractExcelConverter { * @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 extends AbstractExcelConverter { * @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 { diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwmf/usermodel/HwmfPicture.java b/poi-scratchpad/src/main/java/org/apache/poi/hwmf/usermodel/HwmfPicture.java index 7098f2811d..da220c941e 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwmf/usermodel/HwmfPicture.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwmf/usermodel/HwmfPicture.java @@ -83,7 +83,7 @@ public class HwmfPicture implements Iterable<HwmfRecord>, GenericRecord { /** * @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 Iterable<HwmfRecord>, GenericRecord { * * @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) { diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/HWPFDocument.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/HWPFDocument.java index d52c149af1..5a4296f8e1 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/HWPFDocument.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/HWPFDocument.java @@ -215,7 +215,7 @@ public final class HWPFDocument extends HWPFDocumentCore { * @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 HWPFDocumentCore { * @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 HWPFDocumentCore { * @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 { |