Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeParser.java')
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeParser.java32
1 files changed, 19 insertions, 13 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeParser.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeParser.java
index db404cd50..c61d47c11 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeParser.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeParser.java
@@ -136,20 +136,26 @@ public class CompositeParser extends XMLParser implements XMLConstants {
@Override
public void startElement(String name, Attributes attributes) {
- if (PROPERTIES_ELEMENT.equals(name)) {
- if (propertiesHandler == null) {
- propertiesHandler = new PropertiesHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else if (CHILDREN_ELEMENT.equals(name)) {
- if (childrenHandler == null) {
- childrenHandler = new ChildrenHandler(this, attributes);
- } else {
- duplicateElement(this, name, attributes);
- }
- } else {
+ if (name==null) {
invalidElement(name, attributes);
+ } else switch (name) {
+ case PROPERTIES_ELEMENT:
+ if (propertiesHandler == null) {
+ propertiesHandler = new PropertiesHandler(this, attributes);
+ } else {
+ duplicateElement(this, name, attributes);
+ }
+ break;
+ case CHILDREN_ELEMENT:
+ if (childrenHandler == null) {
+ childrenHandler = new ChildrenHandler(this, attributes);
+ } else {
+ duplicateElement(this, name, attributes);
+ }
+ break;
+ default:
+ invalidElement(name, attributes);
+ break;
}
}

Back to the top