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 | ea0f8e561c4becf4a725828e6c58848ab437c3ad (patch) | |
tree | 68227926a4c3d5ee967257d1f25482d68896e3e1 | |
parent | 91c291d68d2d3979b582b59389fec72aa649d02f (diff) | |
download | qpid-python-ea0f8e561c4becf4a725828e6c58848ab437c3ad.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@1241180 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/java/common/src/main/grammar/SelectorParser.jj | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/qpid/java/common/src/main/grammar/SelectorParser.jj b/qpid/java/common/src/main/grammar/SelectorParser.jj index 32d8b61cc8..ec3a27142f 100644 --- a/qpid/java/common/src/main/grammar/SelectorParser.jj +++ b/qpid/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());
|