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

Bug 363659

Summary: if statement evaluates wrong if(0L> 3L) evaluates to true but debugger show false
Product: [Eclipse Project] JDT Reporter: hans Hellberg <erikswed>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: major    
Priority: P3 CC: Michael_Rennie, remy.suen
Version: 3.8   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description hans Hellberg CLA 2011-11-13 11:09:49 EST
Build Identifier: v6.1 build 7600

see link
http://stackoverflow.com/questions/8111765/java-why-is-long-value-in-if-statement-validated-wrong

Reproducible: Always

Steps to Reproduce:
1.see http://stackoverflow.com/questions/8111765/java-why-is-long-value-in-if-statement-validated-wrong
2.
3.
Comment 1 hans Hellberg CLA 2011-11-13 11:16:48 EST
this is so weird and im sure the problem is on my side.
we are talking about the good-old-if-statement..:)
Sorry for any inconvenience but a saw no other way then bugreport it
Comment 2 hans Hellberg CLA 2011-11-13 11:20:36 EST
2 movies showing the phenomenology:
http://www.youtube.com/watch?v=DFcRfPErfik
http://www.youtube.com/watch?v=NEC04-kLQBE

Notice how Expression evaluation show false for diffHours > 3L
Comment 3 hans Hellberg CLA 2011-11-13 11:39:57 EST
If any of you like,
Im willing to open a remote control session using tightVnc 
or any tool you prefers to resolve this issue.
My private phone is +46761997948 SWEDEN
Comment 4 Michael Rennie CLA 2011-11-22 10:28:35 EST
First look makes me wonder what your auto build setting is? If auto-build is off as you make changes and save there is no HCR (Hot Code Replace) occurring, and I notice in the videos once you step into the if statement (as it appears) you have actually stepped out of scope of the method - the reason the expression(s) fail to update. 

If you expand the error node for the expression, what does it say?
Comment 5 hans Hellberg CLA 2011-11-22 13:24:18 EST
I think the build settings where set to automatic, i cannot open eclipse anymore the Maven indexing is freezing everything on startup. I never toggle the build setting just use default. The eclipse installation must have been compromised  because everything went downhill since i posted this bug.

now running Indigo i will work with the same code so if this happen again i will post.

I tried to reproduce the bug in Indigo but everything works as supposed.


(In reply to comment #4)
> First look makes me wonder what your auto build setting is? If auto-build is
> off as you make changes and save there is no HCR (Hot Code Replace) occurring,
> and I notice in the videos once you step into the if statement (as it appears)
> you have actually stepped out of scope of the method - the reason the
> expression(s) fail to update. 
> 
> If you expand the error node for the expression, what does it say?
Comment 6 Michael Rennie CLA 2012-01-25 11:11:34 EST
> I tried to reproduce the bug in Indigo but everything works as supposed.

Closing as worksforme then...