Uploaded image for project: 'Nuxeo Studio'
  1. Nuxeo Studio
  2. NXS-3481

Fix workspace.properties stream not closed

    XMLWordPrintable

    Details

    • Tags:
    • Sprint:
      NOS-26
    • Story Points:
      1

      Description

      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)
      
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: