akshattandon / projectlombok

Automatically exported from code.google.com/p/projectlombok
0 stars 0 forks source link

Optional arrays are not properly compared in .equals() #798

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a POJO annotated with @EqualsAndHashCode
2. Put an optional array in it Optional<byte[]>.
3. Create two instances with equal arrays.
4. Compare one against the other.

What is the expected output? What do you see instead?

I expected two pojos with equal contents to return 'true' for equals. When 
using optional arrays, it instead returned 'false'.

What version of the product are you using? On what operating system?

1.16.2 on Ubuntu.

Please provide any additional information below.

I created a test case and delomboked it. You can see it here: 
http://pastebin.com/7q6uJ9Un

Original issue reported on code.google.com by jimsm...@gmail.com on 19 Mar 2015 at 6:16