Bug 243889 - Various exceptions are thrown after importing Dojo framework into JavaScript project
Summary: Various exceptions are thrown after importing Dojo framework into JavaScript ...
Status: RESOLVED FIXED
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: 3.0   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: 3.0.2   Edit
Assignee: Phil Berkland CLA
QA Contact: Phil Berkland CLA
URL:
Whiteboard: PMC_approved
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2008-08-12 10:53 EDT by Michael Spector CLA
Modified: 2010-03-03 11:14 EST (History)
2 users (show)

See Also:
david_williams: pmc_approved+
berkland: pmc_approved? (raghunathan.srinivasan)
berkland: pmc_approved? (naci.dai)
berkland: pmc_approved? (deboer)
berkland: pmc_approved? (neil.hauge)
berkland: pmc_approved? (kaloyan)


Attachments
Log file (3.70 KB, application/octet-stream)
2008-08-12 10:53 EDT, Michael Spector CLA
no flags Details
patch (3.13 KB, patch)
2008-08-19 17:17 EDT, Phil Berkland CLA
bjorn.freeman-benson: iplog+
Details | Diff
Additional fixes (4.94 KB, patch)
2008-08-26 04:10 EDT, Michael Spector CLA
bjorn.freeman-benson: iplog+
Details | Diff
Additional fixes (4.85 KB, patch)
2008-08-27 07:39 EDT, Michael Spector CLA
bjorn.freeman-benson: iplog+
Details | Diff
Additional fixes (2.03 KB, patch)
2008-08-27 08:07 EDT, Michael Spector CLA
bjorn.freeman-benson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Spector CLA 2008-08-12 10:53:30 EDT
Created attachment 109788 [details]
Log file

See attached log file.

I think JSDT should be more tolerant to binding resolving issues, since JavaScript is a dynamic language unlike Java.
Comment 1 Phil Berkland CLA 2008-08-19 17:17:15 EDT
Created attachment 110398 [details]
patch
Comment 2 Phil Berkland CLA 2008-08-22 10:35:12 EDT
Applied the patch.
Comment 3 Michael Spector CLA 2008-08-26 04:10:20 EDT
Created attachment 110905 [details]
Additional fixes
Comment 4 Michael Spector CLA 2008-08-26 04:10:59 EDT
Some exceptions still happen. Please see additional fixes patch.
Comment 5 Michael Spector CLA 2008-08-27 07:39:34 EDT
Created attachment 111057 [details]
Additional fixes
Comment 6 Michael Spector CLA 2008-08-27 08:07:15 EDT
Created attachment 111059 [details]
Additional fixes
Comment 7 Phil Berkland CLA 2008-09-10 12:25:51 EDT
The 1st patch is already checked in, so it is only the last 3 patches up for review.

I will be honest and say I have not been able to reproduce this problem, but looking at the patches they do look very safe and do fix some possible exposures.
Zend is an JSDT adopter and they would like to have this fixed in 3.0.2.

    * Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such. 

The javascript validation gives incorrect output when validating large javascript frameworks.

    * Is there a work-around? If so, why do you believe the work-around is insufficient? 

    * How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? 
JSDT units tests

    * Give a brief technical overview. Who has reviewed this fix? 
I have reviewed it.

    * What is the risk associated with this fix? 
      minimal risk involved.  changes are mainly null pointer checks or initialization of variables so they are not null.
Comment 8 David Williams CLA 2008-09-10 14:57:09 EDT
I'm ok with it, since request from Zend, and Phil judges it safe. 

Michael, any idea why Phil wouldn't be able to reproduce? 

Comment 9 Phil Berkland CLA 2008-09-10 16:59:06 EDT
Just to record this, I tried importing dojo 1.1.1 into a new javascript project, and did not receive the exceptions.  TypeBindings being null has been problem in the past, so I can believe Michael saw this under some condition. 
Comment 10 Phil Berkland CLA 2008-09-10 17:21:24 EDT
Applied the patches.