Bug 255466 - [Forms]MessageManager.Message.equals() returns incorrect results because of missing parentheses
Summary: [Forms]MessageManager.Message.equals() returns incorrect results because of m...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.4.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.5 M4   Edit
Assignee: Adam Archer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 255460
  Show dependency tree
 
Reported: 2008-11-16 13:49 EST by Benjamin Cabé CLA
Modified: 2008-12-02 13:00 EST (History)
2 users (show)

See Also:


Attachments
Patch (1.36 KB, patch)
2008-11-16 13:54 EST, Benjamin Cabé CLA
agarcher: iplog+
Details | Diff
mylyn/context/zip (1.16 KB, application/octet-stream)
2008-11-16 13:54 EST, Benjamin Cabé CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Cabé CLA 2008-11-16 13:49:11 EST
 
Comment 1 Benjamin Cabé CLA 2008-11-16 13:54:22 EST
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()
Comment 2 Benjamin Cabé CLA 2008-11-16 13:54:26 EST
Created attachment 118001 [details]
mylyn/context/zip
Comment 3 Chris Aniszczyk CLA 2008-11-16 17:54:41 EST
Adam, can you investigate?
Comment 4 Benjamin Cabé CLA 2008-11-17 00:21:10 EST
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 :)
Comment 5 Chris Aniszczyk CLA 2008-11-24 11:55:43 EST
Adam, ping!
Comment 6 Chris Aniszczyk CLA 2008-11-24 12:02:01 EST
Dejan to the rescue?
Comment 7 Chris Aniszczyk CLA 2008-11-30 14:53:24 EST
Adam, ping.

Do you have time for this simple fix in 3.5M4? Please ;)?
Comment 8 Adam Archer CLA 2008-12-02 13:00:53 EST
Fix looks good. Patch applied to HEAD for M4.