We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Why black color equals to empty color?

In aspose cell for java, Color.getBlack().equals(Color.getEmpty()) returns false.

It’s a bug I think


Is it giving some different value (i.e., “false”) in some older versions of the product? I have used your line of code with some older versions and it gives the same result i.e. “true”.

Thank you.

It’s always give true.
But I think true is not correct.
Why empty should equal to black?

Hi Huangfu,

Thanks for your posting and using Aspose.Cells.

We have tested this issue in .NET and Java version and found that it is bug.

In .NET version, the following code returns false, which is correct.


bool r = Color.Black.Equals(Color.Empty);

But in Java version, the following code returns true, which is wrong.

boolean r = Color.getBlack().equals(Color.getEmpty());

We have logged this issue in our database for investigation. We will look into it and fix this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as

  • CELLSJAVA-41062 - Color.getBlack().equals(Color.getEmpty()) returns true. It should return false.


Please try our latest fix/version: Aspose.Cells for Java v8.2.2.1

We have fixed your issue now.

Let us know your feedback.

Thank you.

The issues you have found earlier (filed as CELLSJAVA-41062) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.