diff options
author | Thomas Watson | 2013-08-12 20:15:46 +0000 |
---|---|---|
committer | Thomas Watson | 2013-08-12 20:15:46 +0000 |
commit | 0d5825ea6bbcccf7b6a23b6b43149e02ad442ba5 (patch) | |
tree | 2808ec7bf4481f1a5306e9cb1c5123e2bb832a04 /bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal | |
parent | 7b12f13d96dd528188a3c49a12214d8eddbb8809 (diff) | |
download | rt.equinox.framework-0d5825ea6bbcccf7b6a23b6b43149e02ad442ba5.tar.gz rt.equinox.framework-0d5825ea6bbcccf7b6a23b6b43149e02ad442ba5.tar.xz rt.equinox.framework-0d5825ea6bbcccf7b6a23b6b43149e02ad442ba5.zip |
Bug 411718 - ConcurrentModificationException in org.eclipse.osgi.internal.resolver.StateWriter.writeListI20130813-1330I20130813-1200I20130813-0800
Diffstat (limited to 'bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal')
-rw-r--r-- | bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateWriter.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateWriter.java b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateWriter.java index 57a10d0eb..88e85ba4f 100644 --- a/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateWriter.java +++ b/bundles/org.eclipse.osgi.compatibility.state/src/org/eclipse/osgi/internal/resolver/StateWriter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2003, 2012 IBM Corporation and others. + * Copyright (c) 2003, 2013 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -679,10 +679,12 @@ class StateWriter { } public void saveStateDeprecated(StateImpl state, DataOutputStream output) throws IOException { - try { - writeStateDeprecated(state, output); - } finally { - output.close(); + synchronized (state.monitor) { + try { + writeStateDeprecated(state, output); + } finally { + output.close(); + } } } |