# HG changeset patch # User Vladimir Kvashin # Date 1334925892 -14400 # Branch release701_fixes # Node ID ca793d213bcd42230971ccb75496b428fcdec15d # Parent f89feec97df8dff110143d94a8cec80ee0dd4c56 fixed #211508 - Dedlock in WritingQueue diff --git a/dlight.remote.impl/src/org/netbeans/modules/remote/impl/fs/WritingQueue.java b/dlight.remote.impl/src/org/netbeans/modules/remote/impl/fs/WritingQueue.java --- a/dlight.remote.impl/src/org/netbeans/modules/remote/impl/fs/WritingQueue.java +++ b/dlight.remote.impl/src/org/netbeans/modules/remote/impl/fs/WritingQueue.java @@ -1,4 +1,4 @@ -/* + /* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 2010 Oracle and/or its affiliates. All rights reserved. @@ -224,6 +224,7 @@ private void taskFinished(Future finishedTask) { LOGGER.log(Level.FINEST, "WritingQueue: Task {0} at {1} finished", new Object[]{finishedTask, execEnv}); + UploadStatus uploadStatus = null; synchronized (lock) { if (currentTask != null && currentTask != finishedTask) { // currentTask can contain either null or the last task @@ -239,11 +240,10 @@ return; } try { - UploadStatus uploadStatus = finishedTask.get(); + uploadStatus = finishedTask.get(); if (uploadStatus.isOK()) { LOGGER.log(Level.FINEST, "WritingQueue: uploading {0} succeeded", fo); - failed.remove(fo.getPath()); // paranoia - fo.getParent().updateStat(fo, uploadStatus.getStatInfo()); + failed.remove(fo.getPath()); // paranoia } else { LOGGER.log(Level.FINEST, "WritingQueue: uploading {0} failed", fo); failed.add(fo.getPath()); @@ -259,6 +259,9 @@ } progress.entryDone(entries.size()); } + if (uploadStatus != null && uploadStatus.isOK()) { + fo.getParent().updateStat(fo, uploadStatus.getStatInfo()); + } } }