summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2013-06-12 15:36:29 (EDT)
committer Steffen Pingel2013-06-13 04:44:17 (EDT)
commitf7dfdb3f1da56b753290e3d08438f2203b5754f7 (patch)
tree3e64c0afa16e0f43f662e79e193a52276854398d
parentab4249689cd86de3880f566b2fe453e20baaf6ba (diff)
downloadorg.eclipse.mylyn.tasks-f7dfdb3f1da56b753290e3d08438f2203b5754f7.zip
org.eclipse.mylyn.tasks-f7dfdb3f1da56b753290e3d08438f2203b5754f7.tar.gz
org.eclipse.mylyn.tasks-f7dfdb3f1da56b753290e3d08438f2203b5754f7.tar.bz2
410062: [api] settings page constructor should not rely on overriddenrefs/changes/79/13779/2
methods Change-Id: I8f167f7e10cbe903a9a62f5e1e7273031effbde9 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=410062
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractTaskRepositoryPage.java4
2 files changed, 4 insertions, 4 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java
index c9c4dab..df1fd67 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java
@@ -255,6 +255,10 @@ public abstract class AbstractRepositorySettingsPage extends AbstractTaskReposit
connector = TasksUi.getRepositoryManager().getRepositoryConnector(getConnectorKind());
}
this.connector = connector;
+ if (repository != null && !repository.getConnectorKind().equals(getConnectorKind())) {
+ throw new IllegalArgumentException(
+ "connectorKind of repository does not match connectorKind of page, expected '" + getConnectorKind() + "', got '" + repository.getConnectorKind() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
setNeedsAnonymousLogin(false);
setNeedsEncoding(true);
setNeedsTimeZone(true);
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractTaskRepositoryPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractTaskRepositoryPage.java
index 67878e0..6dfb357 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractTaskRepositoryPage.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractTaskRepositoryPage.java
@@ -88,10 +88,6 @@ public abstract class AbstractTaskRepositoryPage extends WizardPage implements I
*/
public AbstractTaskRepositoryPage(String title, String description, TaskRepository repository) {
super(title);
- if (repository != null && !repository.getConnectorKind().equals(getConnectorKind())) {
- throw new IllegalArgumentException(
- "connectorKind of repository does not match connectorKind of page, expected '" + getConnectorKind() + "', got '" + repository.getConnectorKind() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
this.repository = repository;
this.contributions = new ArrayList<AbstractTaskRepositoryPageContribution>();
setTitle(title);