[Bug 62287] ValueExpressionImpl#equals is wrong

2018-04-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=62287 --- Comment #9 from Mark Struberg --- > It's not used in SimpleNode#equals, for instance. Oki, in that case please leave the hashCode() check! Reason: the hashCode is internally cached as far as I've seen. So if you can quickly find NON match

[Bug 62287] ValueExpressionImpl#equals is wrong

2018-04-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=62287 --- Comment #8 from Christopher Schultz --- (In reply to Mark Struberg from comment #7) > But of course hashCode() will likely again be called in Node#equals(). That > would make it being called twice - which makes no sense. I've rarely seen a

[Bug 62287] ValueExpressionImpl#equals is wrong

2018-04-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=62287 --- Comment #7 from Mark Struberg --- Thanks for the feedback and applying. Have been sick over the weekend, so sorry for the delay. > I would actually prefer to drop the hashCode because: Yes, you are both right. I first intended to ship a m

[Bug 62287] ValueExpressionImpl#equals is wrong

2018-04-23 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=62287 --- Comment #6 from Mark Thomas --- No objection here. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tom

[Bug 62287] ValueExpressionImpl#equals is wrong

2018-04-23 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=62287 --- Comment #5 from Christopher Schultz --- I would actually prefer to drop the hashCode because: 1. It complicates code unnecessarily (!) 2. It makes a guess about the implementation of Node.equals() that a hash-code check is faster than any

[Bug 62287] ValueExpressionImpl#equals is wrong

2018-04-23 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=62287 --- Comment #4 from Mark Thomas --- (In reply to Christopher Schultz from comment #3) > It's a little late, but I have a few comments about the patch. > > 1. There is no reason to check the hashcode if you are going to call > .equals. Presumab

[Bug 62287] ValueExpressionImpl#equals is wrong

2018-04-23 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=62287 --- Comment #3 from Christopher Schultz --- It's a little late, but I have a few comments about the patch. 1. There is no reason to check the hashcode if you are going to call .equals. Presumably, Node.equals() knows the best way to compare mo

[Bug 62287] ValueExpressionImpl#equals is wrong

2018-04-23 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=62287 Mark Thomas changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

[Bug 62287] ValueExpressionImpl#equals is wrong

2018-04-23 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=62287 --- Comment #1 from Mark Thomas --- Given the current implementation, the odds of a hash collision look to be very small. The probably explains why the code has been like this since 6.0.x without any bugs reported. That said, the Javadoc for #h