Why black color equals to empty color?

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

It’s a bug I think

Hi,


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.

C#


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


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

Java
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.

Hi,


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.