mirror of
https://github.com/apache/poi.git
synced 2026-02-27 20:40:08 +08:00
[bug-69628] more changes to getMax methods
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1924992 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8bf71069cd
commit
f91ff62a55
@ -72,7 +72,8 @@ public class TimeStampSimpleHttpClient implements TimeStampHttpClient {
|
||||
* @return the max timestamp response size allowed
|
||||
*/
|
||||
public static int getMaxTimestampResponseSize() {
|
||||
return MAX_TIMESTAMP_RESPONSE_SIZE;
|
||||
final int ioMaxSize = IOUtils.getByteArrayMaxOverride();
|
||||
return ioMaxSize < 0 ? MAX_TIMESTAMP_RESPONSE_SIZE : Math.min(MAX_TIMESTAMP_RESPONSE_SIZE, ioMaxSize);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,8 @@ public final class XSLFPictureData extends POIXMLDocumentPart implements Picture
|
||||
* @return the max image size allowed for XSLF pictures
|
||||
*/
|
||||
public static int getMaxImageSize() {
|
||||
return MAX_IMAGE_SIZE;
|
||||
final int ioMaxSize = IOUtils.getByteArrayMaxOverride();
|
||||
return ioMaxSize < 0 ? MAX_IMAGE_SIZE : Math.min(MAX_IMAGE_SIZE, ioMaxSize);
|
||||
}
|
||||
|
||||
private Long checksum;
|
||||
|
||||
@ -49,7 +49,8 @@ public class XWPFPictureData extends POIXMLDocumentPart {
|
||||
* @return the max image size allowed for XSSF pictures
|
||||
*/
|
||||
public static int getMaxImageSize() {
|
||||
return MAX_IMAGE_SIZE;
|
||||
final int ioMaxSize = IOUtils.getByteArrayMaxOverride();
|
||||
return ioMaxSize < 0 ? MAX_IMAGE_SIZE : Math.min(MAX_IMAGE_SIZE, ioMaxSize);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user