]> source.dussan.org Git - poi.git/commitdiff
Provide more output when failing range-checks on HSL2RGB-construction
authorDominik Stadler <centic@apache.org>
Mon, 10 Aug 2015 06:17:44 +0000 (06:17 +0000)
committerDominik Stadler <centic@apache.org>
Mon, 10 Aug 2015 06:17:44 +0000 (06:17 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1694960 13f79535-47bb-0310-9956-ffa450edef68

src/integrationtest/org/apache/poi/stress/XSLFFileHandler.java
src/java/org/apache/poi/sl/draw/DrawPaint.java

index 2669238be12d6fd7d3418abeccfe96a20ef6f648..ba33ad589e73a5914ead8bb77b60740d2725ac55 100644 (file)
@@ -97,7 +97,7 @@ public class XSLFFileHandler extends AbstractFileHandler {
        // a test-case to test this locally without executing the full TestAllFiles
        @Test
        public void test() throws Exception {
-               InputStream stream = new FileInputStream("test-data/slideshow/SampleShow.pptx");
+               InputStream stream = new FileInputStream("test-data/slideshow/ae.ac.uaeu.faculty_nafaachbili_GeomLec1.pptx");
                try {
                        handleFile(stream);
                } finally {
@@ -105,10 +105,9 @@ public class XSLFFileHandler extends AbstractFileHandler {
                }
        }
 
-
     // a test-case to test this locally without executing the full TestAllFiles
     @Test
     public void testExtractor() throws Exception {
-        handleExtracting(new File("test-data/slideshow/testPPT.thmx"));
+        handleExtracting(new File("test-data/slideshow/ae.ac.uaeu.faculty_nafaachbili_GeomLec1.pptx"));
     }
 }
\ No newline at end of file
index 2221c2f2f61a8c170dc7481a63ea202315cc2d2e..c291717431b25edd07aea389e5dac58d0721b346 100644 (file)
@@ -357,17 +357,17 @@ public class DrawPaint {
      */\r
     private static Color HSL2RGB(double h, double s, double l, double alpha) {\r
         if (s <0.0f || s > 100.0f) {\r
-            String message = "Color parameter outside of expected range - Saturation";\r
+            String message = "Color parameter outside of expected range - Saturation: " + s;\r
             throw new IllegalArgumentException( message );\r
         }\r
 \r
         if (l <0.0f || l > 100.0f) {\r
-            String message = "Color parameter outside of expected range - Luminance";\r
+            String message = "Color parameter outside of expected range - Luminance: " + l;\r
             throw new IllegalArgumentException( message );\r
         }\r
 \r
         if (alpha <0.0f || alpha > 1.0f) {\r
-            String message = "Color parameter outside of expected range - Alpha";\r
+            String message = "Color parameter outside of expected range - Alpha: " + alpha;\r
             throw new IllegalArgumentException( message );\r
         }\r
 \r