Bug #53707: SlideShow.addPicture declares IOException but throws HSLFException
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1402550 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7ba0f8af84
commit
074dd87183
@ -853,13 +853,13 @@ public final class SlideShow {
|
|||||||
public int addPicture(File pict, int format) throws IOException {
|
public int addPicture(File pict, int format) throws IOException {
|
||||||
int length = (int) pict.length();
|
int length = (int) pict.length();
|
||||||
byte[] data = new byte[length];
|
byte[] data = new byte[length];
|
||||||
try {
|
FileInputStream is = null;
|
||||||
FileInputStream is = new FileInputStream(pict);
|
try {
|
||||||
|
is = new FileInputStream(pict);
|
||||||
is.read(data);
|
is.read(data);
|
||||||
is.close();
|
} finally {
|
||||||
} catch (IOException e) {
|
if(is != null) is.close();
|
||||||
throw new HSLFException(e);
|
}
|
||||||
}
|
|
||||||
return addPicture(data, format);
|
return addPicture(data, format);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user