facebook

Use ‘===’ to compare with null AND warnings suppressed

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #257161 Reply

    afeltner
    Member

    I am using the free 30day version of your software to give it a try. I’m using Windows for Eclipse 3.2.

    I’ve got a line of .js code that looks like this:

    if (event == null) { … }

    In the MyEclipse I get a warning that says:

    Use ‘===’ to compare with null.

    I can not find anything anywhere (google) about using 3 =’s for comparisons.

    I have two main questions.

    1. What does this warning really mean

    2. More importantly it seems that when I get this warning all other warning for this file are suppressed. Is this a known problem with MyEclipse? Is there any way to make it show all errors/warnings for a file and not just the first one it finds? If not this is going to be a real negative in my decision on whether or not to purchase it.

    Thanks.
    Andrea

    #257210

    Riyad Kalla
    Member

    Andrea,
    Great question, this link should clear it up:
    http://lists.evolt.org/archive/Week-of-Mon-20050214/169524.html

    The triple equals does not casting, to avoid exceptions.

    #257235

    afeltner
    Member

    Riyad,

    Thanks that helps explain the === some, but I have a question related to #2 above. If you do chose to use the == and MyEclipse flags it as a warning, how come it doesn’t show you the remaining warnings in that .js file? It seems to only show one error at a time in .js files. Is that just the way it works or is there some configuration somewhere that I can specify for it to show me all errors? It seems to flag multiple errors in .jsp files, just not .js files.

    Thanks,
    Andrea

    #257242

    Riyad Kalla
    Member

    Andrea,
    Does your project currently show a ton of other warnings, you may be hitting a annotation limit somewhere. If not, then it’s possible the JavaScript validator is programmed to stop as soon as it hits any problem (as the assumption is it will just keep hitting more and more fake problems as it’s now confused). It’s hard to say.

    #257352

    afeltner
    Member

    Riyad,

    I created a new project and moved 4 javascript files into it. I still experience only one (sometimes 2) warnings per file. When I fix one it then will flag another. The bigest advantage with the MyEclipse tool over other free ones is the java script validation and debugging, but if it’s only going to report one thing at a time, I’m not sure how much of an advantage it will be. Especially if you want to ignore a warning that it has flagged. Then you can’t see any more that you might want to fix.

    So I take it you are not sure how it’s doing the java script validation or if there’s a way to make it show all warnings? Is MyElipse just using a 3rd party validator so your not exactly sure why it stops?

    Andrea

    #257393

    Riyad Kalla
    Member

    Andrea,
    I have filed this issue for investigation, I just personally don’t know enough about the JS validator to offer really meaty replies right now. Sorry.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Use ‘===’ to compare with null AND warnings suppressed

You must be logged in to post in the forum log in