Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsminto2010-03-04 13:41:21 -0500
committersminto2010-03-04 13:41:21 -0500
commitd69a81e052e6005c2a4d16562dcec1004ef7c0b2 (patch)
treef541668a37baca91874556b8014ad229197d9c54 /org.eclipse.mylyn.tasks.core
parent86a87382ef88d402f08ce2ed9454a2c7280ab5bd (diff)
downloadorg.eclipse.mylyn.tasks-d69a81e052e6005c2a4d16562dcec1004ef7c0b2.tar.gz
org.eclipse.mylyn.tasks-d69a81e052e6005c2a4d16562dcec1004ef7c0b2.tar.xz
org.eclipse.mylyn.tasks-d69a81e052e6005c2a4d16562dcec1004ef7c0b2.zip
RESOLVED - bug 304694: error reading repositories.xml when repository property has a space in it
https://bugs.eclipse.org/bugs/show_bug.cgi?id=304694
Diffstat (limited to 'org.eclipse.mylyn.tasks.core')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoriesExternalizer.java5
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java3
2 files changed, 5 insertions, 3 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoriesExternalizer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoriesExternalizer.java
index 93d61fd13..c624f10f3 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoriesExternalizer.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoriesExternalizer.java
@@ -118,7 +118,8 @@ public class TaskRepositoriesExternalizer {
return contentHandler.getRepositories();
} catch (Throwable e) {
file.renameTo(new File(file.getAbsolutePath() + "-save")); //$NON-NLS-1$
- StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN, "Error reading context file", e)); //$NON-NLS-1$
+ StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
+ "Error reading task repositories", e)); //$NON-NLS-1$
return null;
} finally {
if (inputStream != null) {
@@ -126,7 +127,7 @@ public class TaskRepositoriesExternalizer {
inputStream.close();
} catch (IOException e) {
StatusHandler.log(new Status(IStatus.ERROR, ITasksCoreConstants.ID_PLUGIN,
- "Error closing context file", e)); //$NON-NLS-1$
+ "Error closing task repositories file", e)); //$NON-NLS-1$
}
}
}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java
index 259ee8ede..ea1118bcc 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java
@@ -290,7 +290,7 @@ public final class TaskRepository extends PlatformObject {
}
}
- @SuppressWarnings({ "unchecked" })
+ @SuppressWarnings( { "unchecked" })
private Map<String, String> getAuthInfo() {
synchronized (LOCK) {
if (Platform.isRunning()) {
@@ -824,6 +824,7 @@ public final class TaskRepository extends PlatformObject {
}
public void setProperty(String key, String newValue) {
+ Assert.isLegal(!key.matches(".*\\s.*")); //$NON-NLS-1$
String oldValue = this.properties.get(key);
if ((oldValue != null && !oldValue.equals(newValue)) || (oldValue == null && newValue != null)) {
this.properties.put(key, newValue);

Back to the top