Community
Participate
Working Groups
Build ID: tptp45 i6 Steps To Reproduce: 1. Open an datapool editor in eclipse workbench . 2. Do some actions ,such encrypt an column ,change it's cell value 3. DO not click "save " button in eclipse Menu . 4. Click "close" datapool editor . 5. System prompt user to select " save" or "no" or " cancel" 6. Click "no" to close editor to escape changing and close it directly . 7. Open datapool editor again and find the changes is still saved . More information:
This defect is caused by the addition of the org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart.dispose() method to the DatapoolEditorPart for enhancement 202695. When the editor is saved (save file menu, save toolbar button, CTRL-S, or closing the editor and clicking Yes to save changes), the org.eclipse.hyades.test.ui.editor.extension.BaseEditorExtension.save(IProgressMonitor) method is called. The org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart.dispose() method also saves the datapool again (as well as sets the challenge to null) when the editor is disposed if no columns are encrypted. Xin, why do we need to set the challenge to null in the org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart.dispose() method? If we remove the line that saves the datapool in this method (e.g. ((DatapoolEditorExtension)this.getEditorExtension()).save();), the datapool will be saved by the org.eclipse.hyades.test.ui.editor.extension.BaseEditorExtension.save(IProgressMonitor) method before the editor is disposed (and the org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart.dispose() method is called) so if setting the challenge to null is required, please find another location to do this operation. When you have a fix, please attach it to this defect as a patch and set the review flag to '? paules@ca.ibm.com' so I can review. Thanks.
Updated hours worked for triage.
(In reply to comment #1) > This defect is caused by the addition of the > org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart.dispose() method > to the DatapoolEditorPart for enhancement 202695. When the editor is saved > (save file menu, save toolbar button, CTRL-S, or closing the editor and > clicking Yes to save changes), the > org.eclipse.hyades.test.ui.editor.extension.BaseEditorExtension.save(IProgressMonitor) > method is called. The > org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart.dispose() method > also saves the datapool again (as well as sets the challenge to null) when the > editor is disposed if no columns are encrypted. > Xin, why do we need to set the challenge to null in the > org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart.dispose() method? > If we remove the line that saves the datapool in this method (e.g. > ((DatapoolEditorExtension)this.getEditorExtension()).save();), the datapool > will be saved by the > org.eclipse.hyades.test.ui.editor.extension.BaseEditorExtension.save(IProgressMonitor) > method before the editor is disposed (and the > org.eclipse.hyades.test.ui.internal.editor.DatapoolEditorPart.dispose() method > is called) so if setting the challenge to null is required, please find another > location to do this operation. > When you have a fix, please attach it to this defect as a patch and set the > review flag to '? paules@ca.ibm.com' so I can review. > Thanks. Paul : My purpose to set challenge to null is that I use challenge to check if this datapool is encrypted or not . if it's value is null then means is not encrypted . I have to set challenge to null after user unencrypted all encrypted columns in this datapool and try to close this datapool . Looks like I have to move my actions in dispose() into ((DatapoolEditorExtension)this.getEditorExtension()).save();), I will try it ,any question , I will contact you ,thanks !
Created attachment 94506 [details] Fix this issue and update a patch Move judgement about if chanllenge is null into Datapooltable class ,then do not need do this judgement in dispose() .
Created attachment 94517 [details] Patch V2.
Reviewed (see patch v2).
Patch checked in to CVS (HEAD).
*** Bug 231876 has been marked as a duplicate of this bug. ***
verified and it's ok to close now .