pjfanning commented on code in PR #806:
URL: https://github.com/apache/poi/pull/806#discussion_r2083052331


##########
poi/src/main/java/org/apache/poi/hssf/util/HSSFColor.java:
##########
@@ -145,21 +145,45 @@ public String getHexString() {
          * @return (a copy of) the HSSFColor assigned to the enum
          */
         public HSSFColor getColor() {
-            return new HSSFColor(getIndex(), getIndex2(), color.color);
+            return new HSSFColor(getIndex(), getIndex2(), color.rgb);
         }
     }
 
 
     /** Creates a new instance of HSSFColor */
     public HSSFColor() {
         // automatic index
-        this(0x40, -1, java.awt.Color.BLACK);
+        this(0x40, -1, 0x00);
     }
 
+    /** Deprecated constructor. Adds dependency on {@code java.desktop} module
+     * just to extract RGB from {@link java.awt.Color}. Replace usage of
+     * this constructor by:
+     * <pre>
+     * new HSSFColor(index, index2, color.getRGB());
+     * </pre>
+     * or specify RGB directly.
+     *
+     * @param index
+     * @param index2
+     * @param color
+     * @deprecated prefer constructor that specifies RGB directly as a value
+     */
+    @Deprecated

Review Comment:
   why deprecate a constructor if simply prefer another constructor?



-- 
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: dev-unsubscr...@poi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to