| Summary: | [Forms]MessageManager.Message.equals() returns incorrect results because of missing parentheses | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Benjamin Cabé <contact> | ||||||
| Component: | User Assistance | Assignee: | Adam Archer <agarcher> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | caniszczyk, dejan | ||||||
| Version: | 3.4.1 | ||||||||
| Target Milestone: | 3.5 M4 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 255460 | ||||||||
| Attachments: |
|
||||||||
|
Description
Benjamin Cabé
Created attachment 118000 [details]
Patch
I don't know how it hasn't been reported sooner, because this is very annoying and can lead to the removal of a wrong message when calling removeMessage()
Created attachment 118001 [details]
mylyn/context/zip
Adam, can you investigate? Since == > && > ?/ (see http://leepoint.net/notes-java/data/expressions/precedence.html for example) msg.getPrefix() == null ? getPrefix() == null : msg.getPrefix().equals(getPrefix()) && msg.getControl() ... is equivalent to msg.getPrefix() == null ? getPrefix() == null : (msg.getPrefix().equals(getPrefix()) && msg.getControl() ...) and this is bad :) Adam, ping! Dejan to the rescue? Adam, ping. Do you have time for this simple fix in 3.5M4? Please ;)? Fix looks good. Patch applied to HEAD for M4. |