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

Bug 339494

Summary: [client] Forbidden access dialog does not display
Product: [ECD] Orion Reporter: Malgorzata Janczarska <malgorzata.tomczyk>
Component: ClientAssignee: Malgorzata Janczarska <malgorzata.tomczyk>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: john.arthorne
Version: 0.2   
Target Milestone: 0.2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Malgorzata Janczarska CLA 2011-03-10 06:05:22 EST
After "Don't log auth errors, and remove double function definition" commit forbidden access dialog stopped displaying.
Comment 1 Malgorzata Janczarska CLA 2011-03-10 06:09:42 EST
Done.
forbiddenAccessDlg === null needed to be changed to forbiddenAccessDlg == null, because "==" compares the value and "===" includes also the type in comparison. I don't know how a type of "null" and "undefined" was compared, but apparently they were different. I think generally in comparing anything to "null" it's safer to check it with "==".
Comment 2 Susan McCourt CLA 2011-03-10 11:12:25 EST
== will coerce types (for example 1 == '1') and === will not.
However in this case I think we could avoid confusion (and jslint complaints) by using

if (!forbiddenAccessDlg)

Because you really don't care about null, you just want to check that it exists or not.

(Sorry to butt in, I saw this change go by and for a moment was afraid I had introduced a problem because I tend to clean up the == problem markers as I see them.)
Comment 3 John Arthorne CLA 2011-03-10 14:24:29 EST
Sigh, stupid language. I was just making jslint happy but I shouldn't have touched it at this point in M6.

(undefined == null) -> true
(undefined === null) -> false

I agree that if (!forbiddenAccessDlg) would be cleaner, but I'll leave it for now. Thanks Gosia.