summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Muskalla2012-09-06 05:23:02 (EDT)
committer Steffen Pingel2012-09-10 20:25:07 (EDT)
commitcb6c33a424de250d280c136a2c7e906db38c540d (patch)
tree3f7d0752c2033c19fbc5a8d3a486e0414c8a4190
parent720679b020263796d08e88c9c6886d3a95ee50c5 (diff)
downloadorg.eclipse.mylyn.tasks-cb6c33a424de250d280c136a2c7e906db38c540d.zip
org.eclipse.mylyn.tasks-cb6c33a424de250d280c136a2c7e906db38c540d.tar.gz
org.eclipse.mylyn.tasks-cb6c33a424de250d280c136a2c7e906db38c540d.tar.bz2
NEW - bug 388222: RepositoryClientManager fails to deserialize configs
with arrays https://bugs.eclipse.org/bugs/show_bug.cgi?id=388222 Change-Id: Ie3ddf0439a231d1b93a1687dfd2f9a8ae3fb7039
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryClientManager.java2
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/core/RepositoryClientManagerTest.java5
2 files changed, 6 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryClientManager.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryClientManager.java
index be600b4..252373c 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryClientManager.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/RepositoryClientManager.java
@@ -47,7 +47,7 @@ public abstract class RepositoryClientManager<T, C extends Serializable> impleme
@Override
protected Class<?> resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException {
try {
- return repositoryConfigurationClass.getClassLoader().loadClass(desc.getName());
+ return Class.forName(desc.getName(), true, repositoryConfigurationClass.getClassLoader());
} catch (Exception e) {
return super.resolveClass(desc);
}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/core/RepositoryClientManagerTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/core/RepositoryClientManagerTest.java
index fc78c13..cd1fbb7 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/core/RepositoryClientManagerTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/core/RepositoryClientManagerTest.java
@@ -30,8 +30,13 @@ public class RepositoryClientManagerTest extends TestCase {
public String someString = "mylyn";
+ public ConfigSubObject[] anArray = new ConfigSubObject[] { new ConfigSubObject() };
+
public TaskRepository repository = null;
+ }
+ public static class ConfigSubObject implements Serializable {
+ private static final long serialVersionUID = -8730054324154087433L;
}
private class MockRepositoryClientManager extends RepositoryClientManager<Object, MyConfig> {