mirror of
https://github.com/apache/poi.git
synced 2026-02-27 20:40:08 +08:00
throw exception if getAlpha returns very large value (that is too big for int) (#1000)
This commit is contained in:
parent
372388b7ed
commit
58ac8d05f0
@ -230,6 +230,7 @@ public class HSLFPictureShape extends HSLFSimpleShape implements PictureShape<HS
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getAlpha() {
|
public int getAlpha() {
|
||||||
return (int)(super.getAlpha(EscherPropertyTypes.FILL__FILLOPACITY)*100000.0);
|
return Math.toIntExact(
|
||||||
|
(long) (super.getAlpha(EscherPropertyTypes.FILL__FILLOPACITY) * 100000));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user