80 lines
2.8 KiB
Diff
80 lines
2.8 KiB
Diff
Index: src/org/apache/xerces/xpointer/ElementSchemePointer.java
|
|
===================================================================
|
|
--- src/org/apache/xerces/xpointer/ElementSchemePointer.java
|
|
+++ src/org/apache/xerces/xpointer/ElementSchemePointer.java
|
|
@@ -162,8 +162,7 @@ class ElementSchemePointer implements XP
|
|
while (tokens.hasMore()) {
|
|
int token = tokens.nextToken();
|
|
|
|
- switch (token) {
|
|
- case Tokens.XPTRTOKEN_ELEM_NCNAME: {
|
|
+ if( token == Tokens.XPTRTOKEN_ELEM_NCNAME) {
|
|
// Note: Only a single ShortHand pointer can be present
|
|
|
|
// The shortHand name
|
|
@@ -175,14 +174,12 @@ class ElementSchemePointer implements XP
|
|
fShortHandPointer.setSchemeName(fShortHandPointerName);
|
|
|
|
break;
|
|
- }
|
|
- case Tokens.XPTRTOKEN_ELEM_CHILD: {
|
|
+ } else if( token == Tokens.XPTRTOKEN_ELEM_CHILD) {
|
|
tmpChildSequence[i] = tokens.nextToken();
|
|
i++;
|
|
|
|
break;
|
|
- }
|
|
- default:
|
|
+ } else {
|
|
reportError("InvalidElementSchemeXPointer",
|
|
new Object[] { xpointer });
|
|
}
|
|
@@ -871,4 +868,4 @@ class ElementSchemePointer implements XP
|
|
|
|
} // class Scanner
|
|
|
|
-}
|
|
\ No newline at end of file
|
|
+}
|
|
Index: src/org/apache/xerces/xpointer/XPointerHandler.java
|
|
===================================================================
|
|
--- src/org/apache/xerces/xpointer/XPointerHandler.java
|
|
+++ src/org/apache/xerces/xpointer/XPointerHandler.java
|
|
@@ -165,8 +165,7 @@ public final class XPointerHandler exten
|
|
while (tokens.hasMore()) {
|
|
int token = tokens.nextToken();
|
|
|
|
- switch (token) {
|
|
- case Tokens.XPTRTOKEN_SHORTHAND: {
|
|
+ if(token == Tokens.XPTRTOKEN_SHORTHAND) {
|
|
|
|
// The shortHand name
|
|
token = tokens.nextToken();
|
|
@@ -182,8 +181,7 @@ public final class XPointerHandler exten
|
|
shortHandPointer.setSchemeName(shortHandPointerName);
|
|
fXPointerParts.add(shortHandPointer);
|
|
break;
|
|
- }
|
|
- case Tokens.XPTRTOKEN_SCHEMENAME: {
|
|
+ } else if(token == Tokens.XPTRTOKEN_SCHEMENAME) {
|
|
|
|
// Retreive the local name and prefix to form the scheme name
|
|
token = tokens.nextToken();
|
|
@@ -273,8 +271,7 @@ public final class XPointerHandler exten
|
|
}
|
|
|
|
break;
|
|
- }
|
|
- default:
|
|
+ } else {
|
|
reportError("InvalidXPointerExpression",
|
|
new Object[] { xpointer });
|
|
}
|
|
@@ -1248,4 +1245,4 @@ public final class XPointerHandler exten
|
|
super.setProperty(propertyId, value);
|
|
}
|
|
|
|
-}
|
|
\ No newline at end of file
|
|
+}
|