diff options
author | Robert Gemmell <robbie@apache.org> | 2012-02-06 21:04:42 +0000 |
---|---|---|
committer | Robert Gemmell <robbie@apache.org> | 2012-02-06 21:04:42 +0000 |
commit | 85c71e6021c91194b16b8a2f5ef705e05d30f243 (patch) | |
tree | daee5593fda6a0f37dc57aa00bac610a8d471191 | |
parent | 9b3139d433ca353cf21e9c230d41fb1b2c46075a (diff) | |
download | qpid-python-85c71e6021c91194b16b8a2f5ef705e05d30f243.tar.gz |
QPID-3801: change use of escaped single quote to a hex literal to avoid a bug in Checkstyle after JavaCC processes it into escaped unicode. Add braces to if statements and remove tabs for clarity.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1241180 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | java/common/src/main/grammar/SelectorParser.jj | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/java/common/src/main/grammar/SelectorParser.jj b/java/common/src/main/grammar/SelectorParser.jj index 32d8b61cc8..ec3a27142f 100644 --- a/java/common/src/main/grammar/SelectorParser.jj +++ b/java/common/src/main/grammar/SelectorParser.jj @@ -565,10 +565,12 @@ String stringLiteral() : // Decode the sting value.
String image = t.image;
for( int i=1; i < image.length()-1; i++ ) {
- char c = image.charAt(i);
- if( c == '\'' )
- i++;
- rc.append(c);
+ char c = image.charAt(i);
+ if( c == (char) 0x27 )//single quote
+ {
+ i++;
+ }
+ rc.append(c);
}
return rc.toString();
}
@@ -594,7 +596,9 @@ PropertyExpression variable() : for( int i=1; i < image.length()-1; i++ ) {
char c = image.charAt(i);
if( c == '"' )
+ {
i++;
+ }
rc.append(c);
}
return new PropertyExpression(rc.toString());
|