Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 437542

Summary: Repair action should not save the session when the user choice is No.
Product: [Modeling] Sirius Reporter: Maxime Porhel <maxime.porhel>
Component: CoreAssignee: Maxime Porhel <maxime.porhel>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 Keywords: triaged
Version: 1.0.0   
Target Milestone: 1.0.1   
Hardware: PC   
OS: Windows NT   
Whiteboard:
Bug Depends on: 437099    
Bug Blocks:    

Description Maxime Porhel CLA 2014-06-16 11:13:29 EDT
+++ This bug was initially created as a clone of Bug #437099 +++

Repair action should not save the session when the user choice is No. In this case the expected behavior is to close the session without saving it. 

The issues comes from a wrong report. 
It has been introduced by commit 825388b5e120bfe30c75e8bf0539bf1736fadc23 (2013-09-18 09:58:41) Report recent code changes from the previous code base.

>  if (saveSessions) {
>   session.save();
>  }
>  session.close();

became 

>  if (saveSessions) {
>   session.save(new NullProgressMonitor());
>  }
>  session.save(new NullProgressMonitor());

instead of 

>  if (saveSessions) {
>   session.save(new NullProgressMonitor());
>  }
>  session.close(new NullProgressMonitor());

(as it was done in the Viewpoint repository, commit e4ba2e3c3989c89cb598e90d334523285809df35)
Comment 1 Maxime Porhel CLA 2014-06-16 11:19:45 EDT
See https://git.eclipse.org/r/#/c/28579/
Comment 2 Maxime Porhel CLA 2014-06-16 11:26:14 EDT
Correted by commit a7c50aaec3e028ef41a4c89d8da5f4471298c57e
Comment 3 Pierre-Charles David CLA 2015-05-20 07:55:29 EDT
Available in Sirius 1.0.1.