| Summary: | [misc] Compiler Util#isExcluded does not work when given path is file system absolute | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] JSDT | Reporter: | Ian Tewksbury <itewksbu> | ||||||
| Component: | General | Assignee: | Ian Tewksbury <itewksbu> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | Nitin Dahyabhai <thatnitind> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | cmjaun, neil.hauge | ||||||
| Version: | 3.2 | Flags: | cmjaun:
pmc_approved?
(david_williams) cmjaun: pmc_approved? (raghunathan.srinivasan) cmjaun: pmc_approved? (naci.dai) cmjaun: pmc_approved? (deboer) neil.hauge: pmc_approved+ cmjaun: pmc_approved? (kaloyan) cmjaun: review+ thatnitind: review+ |
||||||
| Target Milestone: | 3.2.1 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | PMC_approved | ||||||||
| Attachments: |
|
||||||||
|
Description
Ian Tewksbury
Created attachment 171821 [details]
Fix Patch with JUnits
My fix is to add in a pathMatch method in the Util class that first verifies that both the path and the path matching pattern are either both workspace relative/absolute or file system absolute paths. If they are not then the one that is not absolute to the file system gets converted to be.
I have also included 58 comprehensive JUnits to test all of the different permutations of paths that could be passed to Util#isExcluded.
Fix patch to use inclusion pattern. Created attachment 172357 [details]
Fix Patch with JUnits - Update 1
Good eye. Thanks Chris. All fixed.
* 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.
It prevents hover help documentation from displaying in some circumstances where the doc is stored in a library.
* Is there a work-around? If so, why do you believe the work-around is insufficient?
No.
* How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added?
Ian include many new junit test cases in his patch.
* Give a brief technical overview. Who has reviewed this fix?
The problem was the comparing of file paths to determine if certain hover help should be displayed. In some cases relatives paths were being returned and in some absolute paths were being returned. The current implementation did not correctly compare relative and absolute paths. Comment #1 by Ian explains the fix in more detail. It has been reviewed by Nitin and myself.
* What is the risk associated with this fix?
This fix is contained to displaying the hover help, so there is little risk to JSDT as a hole.
Patch checked in. |