Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 508392

Summary: [quickfix] Use isNaN fix breaks code logic
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 8.0   
Target Milestone: 13.0   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Michael Rennie CLA 2016-11-29 10:41:59 EST
Consider the following snippet:

var a = NaN === b;
a = NaN !== b


First expression fixes to: var a = isNaN(b); (GOOD)
Second expression fixes to: a = isNaN(b); (BAD)

It should fix to: !isNaN(b)
Comment 1 Michael Rennie CLA 2016-11-29 11:33:06 EST
Fix + tests (plus removing some trailing whitespace): http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=3e55216911241c49b0a9ab4c47194f3d0302d50e