Skip to content

Commit 6652661

Browse files
committed
Revert "CSSTUDIO-2072 Skip to closing single quote when parsing a single quote. This allows for spaces and other separators inside single quotes."
This reverts commit 07d4fcf.
1 parent 39d4f77 commit 6652661

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

app/databrowser/src/main/java/org/csstudio/trends/databrowser3/ui/DroppedPVNameParser.java

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ public static List<String> parseDroppedPVs(String text) throws Exception
4747
final char c = text.charAt(pos);
4848
if (c == '"')
4949
pos = locateClosingQuote(text, pos+1);
50-
else if (c == '\'') {
51-
pos = locateClosingSingleQuote(text, pos+1);
52-
}
5350
else if (c == '(')
5451
pos = locateClosingBrace(text, pos+1);
5552
else if ("\r\n\t,; ".indexOf(c) >= 0)
@@ -88,24 +85,6 @@ private static int locateClosingQuote(final String text, int pos) throws Excepti
8885
return end + 1;
8986
}
9087

91-
/** Locate closing, non-escaped single quote
92-
* @param text Text to search
93-
* @param pos Position after opening single quote
94-
* @return Position after the closing single quote, or -1
95-
* @throws Exception if there is no closing single quote
96-
*/
97-
private static int locateClosingSingleQuote(final String text, int pos) throws Exception
98-
{
99-
int end = text.indexOf('\'', pos);
100-
while (end > pos && text.charAt(end-1) == '\\') {
101-
end = text.indexOf('\'', end+1);
102-
}
103-
if (end < 0) {
104-
throw new Exception("Missing closing single quote");
105-
}
106-
return end + 1;
107-
}
108-
10988
/** Locate closing brace, ignoring those inside quotes
11089
* @param text Text to search
11190
* @param pos Position after opening quote

0 commit comments

Comments
 (0)