From 85c71e6021c91194b16b8a2f5ef705e05d30f243 Mon Sep 17 00:00:00 2001 From: Robert Gemmell Date: Mon, 6 Feb 2012 21:04:42 +0000 Subject: 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 --- java/common/src/main/grammar/SelectorParser.jj | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'java/common/src') 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()); -- cgit v1.2.1