Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java')
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java
index 888b93c84..04970451e 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java
@@ -163,6 +163,26 @@ public class SaxMultiBugReportContentHandler extends DefaultHandler {
isPatch = "1".equals(attributes.getValue(BugzillaAttribute.IS_PATCH.getKey()));
}
break;
+ case FLAG:
+ if (attributes != null && attributes.getLength() > 0) {
+ String name = attributes.getValue(ATTRIBUTE_NAME);
+ if (name != null) {
+ BugzillaFlagMapper mapper = new BugzillaFlagMapper();
+ String requestee = attributes.getValue("requestee");
+ mapper.setRequestee(requestee);
+ String setter = attributes.getValue("setter");
+ mapper.setSetter(setter);
+ String status = attributes.getValue("status");
+ mapper.setState(status);
+ mapper.setFlagId(name);
+ String id = attributes.getValue("id");
+ mapper.setNumber(Integer.valueOf(id));
+ TaskAttribute attribute = repositoryTaskData.getRoot()
+ .createAttribute("task.common.kind.flag" + id);
+ mapper.applyTo(attribute);
+ }
+ }
+ break;
}
}
@@ -170,6 +190,11 @@ public class SaxMultiBugReportContentHandler extends DefaultHandler {
@Override
public void endElement(String uri, String localName, String qName) throws SAXException {
+ //remove whitespaces from the end of the parsed Text
+ while (characters.length() > 0 && Character.isWhitespace(characters.charAt(characters.length() - 1))) {
+ characters.setLength(characters.length() - 1);
+ }
+
String parsedText = characters.toString();
if (localName.startsWith(BugzillaCustomField.CUSTOM_FIELD_PREFIX)) {
@@ -372,6 +397,9 @@ public class SaxMultiBugReportContentHandler extends DefaultHandler {
case UNKNOWN:
//ignore
break;
+ case FLAG:
+ //ignore
+ break;
default:
TaskAttribute defaultAttribute = repositoryTaskData.getRoot().getMappedAttribute(tag.getKey());
if (defaultAttribute == null) {

Back to the top