-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 40
-
Fix Version/s: 41
-
Component/s: Connect / Account Management
-
Tags:
-
Sprint:NOS-26
-
Story Points:1
When the close() method is not called on the FileReader or the FileOutputStream used to read or write the workspace.properties file in the WorkspaceProperties class, the process maintains a lock on this file and it cannot be deleted.
On windows, it causes tests failures like :
ensure_branch_exists(com.nuxeo.studio.api.BranchServiceTest) Time elapsed: 0.107 sec <<< ERROR! org.eclipse.jgit.api.errors.JGitInternalException: Destination path "" already exists and is not an empty directory at org.eclipse.jgit.api.CloneCommand.init(CloneCommand.java:143) at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:124) at com.nuxeo.studio.core.versioning.VersioningGitLocalImpl.cloneRemote(VersioningGitLocalImpl.java:163) at com.nuxeo.studio.core.workspace.WorkspaceProvider.clone(WorkspaceProvider.java:115) at com.nuxeo.studio.core.workspace.WorkspaceProvider.createReadOnly(WorkspaceProvider.java:96) at com.nuxeo.studio.core.workspace.DefaultWorkspacePool.get(DefaultWorkspacePool.java:175) at com.nuxeo.studio.core.workspace.WorkspaceServiceImpl.getReadOnlyWorkspace(WorkspaceServiceImpl.java:56) at com.nuxeo.studio.core.BranchServiceImpl.getBranches(BranchServiceImpl.java:163) at com.nuxeo.studio.core.BranchServiceImpl.getBranchIfExist(BranchServiceImpl.java:150) at com.nuxeo.studio.core.BranchServiceImpl.createBranch(BranchServiceImpl.java:117) at com.nuxeo.studio.api.BranchServiceTest.ensure_branch_exists(BranchServiceTest.java:412)