Project
IntelliJ IDEA
Priority
Normal
Type
Cosmetics
Fix versions
No Fix versions
State
Fixed
Assignee
Bas Leijdekkers
Subsystem
Editor. Intention Actions
Affected versions
No Affected versions
Fixed in build
108.65  
  • Created by   Rob Harwood
    6 years ago (11 Aug 2005 21:08)
  • Updated by   root
    2 years ago (17 Jan 2010 20:22)
  • Jira: IDEADEV-2289
    (history, comments)
 
IDEA-29824 'Flip unsafe .before()' intention doesn't switch it to .after()
0
Issue is visible to: All Users
  The issue is visible to the selected user group only
d1.before(d2) should become d2.after(d1), not d2.before(d1).

Issue was resolved
Comments (5)
 
History
 
Linked Issues (?)
 
Dmitry Jemerov
  Dmitry Jemerov
15 Aug 2005 15:40
6 years ago
The reason the intention is called "unsafe" is that it doesn't guarantee preserving the code semantics. The only safe flips currently supported are for .equals() and .equalsIgnoreCase().
Rob Harwood
  Rob Harwood
15 Aug 2005 19:03
6 years ago
Ah, I see. The word 'unsafe' is confusing here then. I would suggest changing the text of the intention to 'Flip .before() method call (may change semantics)', or something like that. I thought it meant 'flip the unsafe call of .before()' (unsafe since it might NPE).
Bas Leijdekkers
  Bas Leijdekkers
17 Aug 2005 04:33
6 years ago
The change in text sounds reasonable and I have commited that as a fix. Changing .before() to .after() (for java.util.Date I presume) sounds a bit too obscure to implement. If there are no objections I will close this request as fixed.
Bas Leijdekkers
  Bas Leijdekkers
19 Aug 2005 14:34
6 years ago
it seems there were no objections.
Bas Leijdekkers
  Bas Leijdekkers
19 Aug 2005 14:35
6 years ago
should be fixed in #3459