gffloodg opened a new pull request, #385: URL: https://github.com/apache/poi/pull/385
When rendering a shape with a gradient fill that contains 2 or more stops that are at the exact same fractional position, the rendering will fail with the following exception: `User must specify at least 2 colors: java.lang.IllegalArgumentException java.lang.IllegalArgumentException: User must specify at least 2 colors at java.awt.MultipleGradientPaint.<init>(MultipleGradientPaint.java:169) at java.awt.LinearGradientPaint.<init>(LinearGradientPaint.java:286) at java.awt.LinearGradientPaint.<init>(LinearGradientPaint.java:244) at java.awt.LinearGradientPaint.<init>(LinearGradientPaint.java:211) at org.apache.poi.sl.draw.DrawPaint.lambda$createLinearGradientPaint$1(DrawPaint.java:548) at org.apache.poi.sl.draw.DrawPaint.safeFractions(DrawPaint.java:620) at org.apache.poi.sl.draw.DrawPaint.createLinearGradientPaint(DrawPaint.java:548) at org.apache.poi.sl.draw.DrawPaint.getGradientPaint(DrawPaint.java:244) at org.apache.poi.sl.draw.DrawPaint.getPaint(DrawPaint.java:167) at org.apache.poi.sl.draw.DrawPaint.getPaint(DrawPaint.java:157) at org.apache.poi.sl.draw.DrawSimpleShape.getFillPaint(DrawSimpleShape.java:144) at org.apache.poi.sl.draw.DrawSimpleShape.d raw(DrawSimpleShape.java:70) at org.apache.poi.sl.draw.DrawSheet.draw(DrawSheet.java:71) at ` This PR adds a unit tests to highlight the issue, and fixes the bug. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
