Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2003-09-22 13:19:20 +0000
committerMichael Valenta2003-09-22 13:19:20 +0000
commitbbee7758400370366682f43aaefd28792596ce62 (patch)
tree4b8e57ee5afe4e00fcac826bedb68fa110eed267
parentcfc55cc9ddbd1f74b65cbac2e7a22b510d1c744b (diff)
downloadeclipse.platform.team-bbee7758400370366682f43aaefd28792596ce62.tar.gz
eclipse.platform.team-bbee7758400370366682f43aaefd28792596ce62.tar.xz
eclipse.platform.team-bbee7758400370366682f43aaefd28792596ce62.zip
Ensure endRule is called even if flush fails
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ReentrantLock.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ReentrantLock.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ReentrantLock.java
index 7ec287588..5e86c55a9 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ReentrantLock.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ReentrantLock.java
@@ -99,11 +99,14 @@ public class ReentrantLock {
*/
public void popRule(IProgressMonitor monitor) throws CVSException {
ISchedulingRule rule = removeRule();
- if (isFlushRequired()) {
- flush(monitor);
- }
- if (rule != NULL_SCHEDULING_RULE) {
- Platform.getJobManager().endRule(rule);
+ try {
+ if (isFlushRequired()) {
+ flush(monitor);
+ }
+ } finally {
+ if (rule != NULL_SCHEDULING_RULE) {
+ Platform.getJobManager().endRule(rule);
+ }
}
}
/**

Back to the top