Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Becker2013-08-19 14:31:58 -0400
committerFrank Becker2013-08-23 11:19:10 -0400
commite7fe0a9a130215f70da651ace0d21640d9a93e25 (patch)
tree5ca7e00597518e91664bf55532e402e124330921 /org.eclipse.mylyn.bugzilla.core/src
parent5dbe1d119010c4ebef52ec5300281cad07cc97bc (diff)
downloadorg.eclipse.mylyn.tasks-e7fe0a9a130215f70da651ace0d21640d9a93e25.tar.gz
org.eclipse.mylyn.tasks-e7fe0a9a130215f70da651ace0d21640d9a93e25.tar.xz
org.eclipse.mylyn.tasks-e7fe0a9a130215f70da651ace0d21640d9a93e25.zip
415263: Null Pointer Exception initializing Bugzilla 4.x task data with
product absent from local configuration Change-Id: I6e9cd732f63c057be297ea95ffa0db67c2926cd5 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=415263
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.core/src')
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfiguration.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfiguration.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfiguration.java
index 0868c5019..000f1c1b7 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfiguration.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfiguration.java
@@ -743,16 +743,15 @@ public class RepositoryConfiguration implements Serializable {
} else {
TaskAttribute everConfirmed = bugReport.getRoot().getAttribute(BugzillaAttribute.EVERCONFIRMED.getKey());
TaskAttribute product = bugReport.getRoot().getMappedAttribute(TaskAttribute.PRODUCT);
- Boolean unconfirmedAllowed = products.get(product.getValue()).getUnconfirmedAllowed();
-
+ boolean unconfirmedAllowed = getUnconfirmedAllowed(product.getValue());
switch (status) {
case START:
addOperation(bugReport, BugzillaOperation.new_default);
addOperation(bugReport, BugzillaOperation.unconfirmed);
TaskAttribute unconfirmedAttribute = bugReport.getRoot().getAttribute(
TaskAttribute.PREFIX_OPERATION + BugzillaOperation.unconfirmed.toString());
- if (unconfirmedAttribute != null && unconfirmedAllowed != null) {
- unconfirmedAttribute.getMetaData().setDisabled(!unconfirmedAllowed.booleanValue());
+ if (unconfirmedAttribute != null) {
+ unconfirmedAttribute.getMetaData().setDisabled(!unconfirmedAllowed);
}
addOperation(bugReport, BugzillaOperation.confirmed);
addOperation(bugReport, BugzillaOperation.in_progress);
@@ -1269,12 +1268,12 @@ public class RepositoryConfiguration implements Serializable {
this.lastModifiedHeader = lastModifiedHeader;
}
- public Boolean getUnconfirmedAllowed(String product) {
+ public boolean getUnconfirmedAllowed(String product) {
ProductEntry entry = products.get(product);
- if (entry != null) {
- return entry.getUnconfirmedAllowed();
+ if (entry != null && entry.getUnconfirmedAllowed() != null) {
+ return entry.getUnconfirmedAllowed().booleanValue();
} else {
- return null;
+ return false;
}
}
}

Back to the top