git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@225510
13f79535-47bb-0310-9956-
ffa450edef68
return null;
}
- //Decorate the InputStream with a BufferedInputStream
- return new java.io.BufferedInputStream(in);
+ //Make sure the InputStream is decorated with a BufferedInputStream
+ if (in instanceof java.io.BufferedInputStream) {
+ return in;
+ } else {
+ return new java.io.BufferedInputStream(in);
+ }
} catch (Exception e) {
log.error("Error while opening stream for ("
+ href + "): " + e.getMessage(), e);