Skip to content

Commit

Permalink
ItemSkippedException now extends FileUploadException
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Jun 11, 2023
1 parent e3f0f19 commit b0bc562
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,16 @@ public interface FileItemStream extends FileItemHeadersSupport {
* {@link FileItemStream#getInputStream()}, after {@link java.util.Iterator#hasNext()} has been invoked on the iterator, which created the
* {@link FileItemStream}.
*/
class ItemSkippedException extends IOException {
class ItemSkippedException extends FileUploadException {

/**
* Constructs an instance with a given detail message.
*
* @param message The detail message (which is saved for later retrieval by the {@link #getMessage()} method)
*/
ItemSkippedException(final String message) {
super(message);
}

/**
* The exceptions serial version UID, which is being used when serializing an exception instance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public int available() throws IOException {

private void checkOpen() throws ItemSkippedException {
if (closed) {
throw new FileItemStream.ItemSkippedException();
throw new FileItemStream.ItemSkippedException("checkOpen");
}
}

Expand Down

0 comments on commit b0bc562

Please sign in to comment.