Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJayaprakash Arthanareeswaran2010-06-16 16:58:10 +0000
committerJayaprakash Arthanareeswaran2010-06-16 16:58:10 +0000
commit9e77630c0dbc70a272fcfff64d38117a0b04b72e (patch)
tree989c7657480959eecef1cf5c41c2d52bd8d3318f
parentd9c0af7b6411c2d395f3a22255d41f5d9d3ee7fb (diff)
downloadeclipse.jdt.core-9e77630c0dbc70a272fcfff64d38117a0b04b72e.tar.gz
eclipse.jdt.core-9e77630c0dbc70a272fcfff64d38117a0b04b72e.tar.xz
eclipse.jdt.core-9e77630c0dbc70a272fcfff64d38117a0b04b72e.zip
3.4 maintenance - Fix for 316447
-rw-r--r--org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties2
-rw-r--r--org.eclipse.jdt.core/buildnotes_jdt-core.html15
-rw-r--r--org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/UserLibraryManager.java64
3 files changed, 51 insertions, 30 deletions
diff --git a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties
index b10a5192a3..5ee34e049f 100644
--- a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties
+++ b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties
@@ -14,7 +14,7 @@
#Format: compiler.name = word1 word2 word3
compiler.name = Eclipse Java Compiler
#Format: compiler.version = 0.XXX[, other words (don't forget the comma if adding other words)]
-compiler.version = 0.902_R34x, 3.4.12
+compiler.version = 0.903_R34x, 3.4.13
compiler.copyright = Copyright IBM Corp 2000, 2010. All rights reserved.
### progress
diff --git a/org.eclipse.jdt.core/buildnotes_jdt-core.html b/org.eclipse.jdt.core/buildnotes_jdt-core.html
index 8884a90dc5..e7d1c3bf72 100644
--- a/org.eclipse.jdt.core/buildnotes_jdt-core.html
+++ b/org.eclipse.jdt.core/buildnotes_jdt-core.html
@@ -38,6 +38,21 @@
</td>
</tr>
</table>
+<a name="v_903_R34x"></a>
+<hr><h1>
+Eclipse Platform Build Notes<br>
+Java development tools core</h1>
+Eclipse SDK 3.4.13 - %date% - 3.4.13
+<br>Project org.eclipse.jdt.core v_903_R34x
+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_903_R34x">cvs</a>).
+<h2>What's new in this drop</h2>
+<ul>
+<li>Incremented org.eclipse.jdt.core plug-in ID to "3.4.13"</li>
+</ul>
+<h3>Problem Reports Fixed</h3>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=316447">316447</a>
+Deadlock in UserLibraryManager - Backport Request
+
<a name="v_902_R34x"></a>
<hr><h1>
Eclipse Platform Build Notes<br>
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/UserLibraryManager.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/UserLibraryManager.java
index 46ab4b0ab9..af625cf938 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/UserLibraryManager.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/UserLibraryManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 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
@@ -120,12 +120,14 @@ public class UserLibraryManager {
// decode user library
UserLibrary userLibrary = encodedUserLibrary == null ? null : UserLibrary.createFromString(new StringReader(encodedUserLibrary));
-
- // update user libraries map
- if (userLibrary != null) {
- this.userLibraries.put(libName, userLibrary);
- } else {
- this.userLibraries.remove(libName);
+
+ synchronized (this) {
+ // update user libraries map
+ if (userLibrary != null) {
+ this.userLibraries.put(libName, userLibrary);
+ } else {
+ this.userLibraries.remove(libName);
+ }
}
// update affected projects
@@ -149,32 +151,36 @@ public class UserLibraryManager {
}
}
- public synchronized void removeUserLibrary(String libName) {
- IEclipsePreferences instancePreferences = JavaModelManager.getJavaModelManager().getInstancePreferences();
- String propertyName = CP_USERLIBRARY_PREFERENCES_PREFIX+libName;
- instancePreferences.remove(propertyName);
- try {
- instancePreferences.flush();
- } catch (BackingStoreException e) {
- Util.log(e, "Exception while removing user library " + libName); //$NON-NLS-1$
+ public void removeUserLibrary(String libName) {
+ synchronized (this.userLibraries) {
+ IEclipsePreferences instancePreferences = JavaModelManager.getJavaModelManager().getInstancePreferences();
+ String propertyName = CP_USERLIBRARY_PREFERENCES_PREFIX+libName;
+ instancePreferences.remove(propertyName);
+ try {
+ instancePreferences.flush();
+ } catch (BackingStoreException e) {
+ Util.log(e, "Exception while removing user library " + libName); //$NON-NLS-1$
+ }
}
// this.userLibraries was updated during the PreferenceChangeEvent (see preferenceChange(...))
}
- public synchronized void setUserLibrary(String libName, IClasspathEntry[] entries, boolean isSystemLibrary) {
- IEclipsePreferences instancePreferences = JavaModelManager.getJavaModelManager().getInstancePreferences();
- String propertyName = CP_USERLIBRARY_PREFERENCES_PREFIX+libName;
- try {
- String propertyValue = UserLibrary.serialize(entries, isSystemLibrary);
- instancePreferences.put(propertyName, propertyValue); // sends out a PreferenceChangeEvent (see preferenceChange(...))
- } catch (IOException e) {
- Util.log(e, "Exception while serializing user library " + libName); //$NON-NLS-1$
- return;
- }
- try {
- instancePreferences.flush();
- } catch (BackingStoreException e) {
- Util.log(e, "Exception while saving user library " + libName); //$NON-NLS-1$
+ public void setUserLibrary(String libName, IClasspathEntry[] entries, boolean isSystemLibrary) {
+ synchronized (this.userLibraries) {
+ IEclipsePreferences instancePreferences = JavaModelManager.getJavaModelManager().getInstancePreferences();
+ String propertyName = CP_USERLIBRARY_PREFERENCES_PREFIX+libName;
+ try {
+ String propertyValue = UserLibrary.serialize(entries, isSystemLibrary);
+ instancePreferences.put(propertyName, propertyValue); // sends out a PreferenceChangeEvent (see preferenceChange(...))
+ } catch (IOException e) {
+ Util.log(e, "Exception while serializing user library " + libName); //$NON-NLS-1$
+ return;
+ }
+ try {
+ instancePreferences.flush();
+ } catch (BackingStoreException e) {
+ Util.log(e, "Exception while saving user library " + libName); //$NON-NLS-1$
+ }
}
// this.userLibraries was updated during the PreferenceChangeEvent (see preferenceChange(...))
}

Back to the top