| Summary: | StructuredTextEditor may complete model lifecycle on a different model | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Nick Sandonato <nsand.dev> | ||||
| Component: | wst.sse | Assignee: | Nick Sandonato <nsand.dev> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Nitin Dahyabhai <thatnitind> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | david_williams | ||||
| Version: | 3.2 | Flags: | david_williams:
pmc_approved+
nsand.dev: pmc_approved? (raghunathan.srinivasan) nsand.dev: pmc_approved? (naci.dai) deboer: pmc_approved+ nsand.dev: pmc_approved? (neil.hauge) nsand.dev: pmc_approved? (kaloyan) thatnitind: review+ |
||||
| Target Milestone: | 3.2.1 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | PMC_approved WI50430 | ||||||
| Attachments: |
|
||||||
|
Description
Nick Sandonato
Created attachment 174105 [details]
patch
Nitin, would you mind taking a look at this for 3.2.1? * 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 primary issue with this is that the wrong model is notified that changes to it have been completed. This causes a couple of things to occur: 1. The lock guarding both the structured document and model is over-released, which may cause synchronization problems between the model and document 2. The model will fire off notifications to its model state listeners signaling that the model has changed, when it fact it hasn't. This can give the listeners the wrong idea about the current state of the model and may result in errors (model changed without model about to change notification). * 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? Existing unit tests have been run as well as manual testing. * Give a brief technical overview. Who has reviewed this fix? The editor always managed the lifecycle of its current model during a save. In the case where a save could lead to a save as (e.g., original file could not be written to), the model changes since the editor's input changes. This resulted in the finalizing of the model's life cycle to be executed on the wrong model. This fix makes sure that finalizing the model's life cycle is done on the same model that the editor started with. Nitin has reviewed the fix. * What is the risk associated with this fix? Almost none. Just guaranteeing that we use the same model through the lifecycle calls. Released to Maintenance and HEAD. |