Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

#### Version 0.9.6 (TBD)
* Fixed a bug that caused a `ParseException` to be thrown when trying to use a `Criteria` object containing a string value wrapped in single or double quotes out of necessity (i.e. because the value contained a keyword). This bug happened because the wrapping quotes were dropped by Concourse Server when parsing the `Criteria`.
* Fixed a bug where the CCL parser failed to handle some Unicode quote characters.

#### Version 0.9.5 (December 30, 2018)
* Fixed a bug where some of the `ManagedConcourseServer#get` methods in the `concourse-ete-test-core` package called the wrong upstream method of the Concourse Server instance under management. This had the effect of causing a runtime `ClassCastException` when trying to use those methods.
Expand Down
2 changes: 1 addition & 1 deletion concourse-driver-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies {
compile 'org.slf4j:log4j-over-slf4j:1.7.5'
compile 'org.slf4j:jcl-over-slf4j:1.7.5'
compile 'com.google.code.gson:gson:2.5'
compile group: 'com.cinchapi', name: 'ccl', version:'2.5.1'
compile group: 'com.cinchapi', name: 'ccl', version:'2.5.2'

testCompile project(':concourse-unit-test-core')
testCompile 'com.github.marschall:memoryfilesystem:0.9.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.cinchapi.ccl.grammar.TimestampSymbol;
import com.cinchapi.ccl.grammar.ValueSymbol;
import com.cinchapi.common.base.AnyStrings;
import com.cinchapi.common.reflect.Reflection;
import com.cinchapi.concourse.thrift.TCriteria;
import com.cinchapi.concourse.thrift.TSymbol;
import com.cinchapi.concourse.thrift.TSymbolType;
Expand All @@ -39,6 +40,13 @@
*/
public final class Language {

/**
* The character that indicates a String should be treated as a
* {@link com.cinchapi.concourse.Tag}.
*/
private static final char TAG_MARKER = Reflection.getStatic("TAG_MARKER",
Convert.class); // (authorized)

/**
* Translate the {@link TSymbol} to its Java analog.
*
Expand All @@ -55,7 +63,8 @@ else if(tsymbol.getType() == TSymbolType.KEY) {
else if(tsymbol.getType() == TSymbolType.VALUE) {
Object symbol = Convert.stringToJava(tsymbol.getSymbol());
if(symbol instanceof String && !symbol.equals(tsymbol.getSymbol())
&& AnyStrings.isWithinQuotes(tsymbol.getSymbol())) {
&& AnyStrings.isWithinQuotes(tsymbol.getSymbol(),
TAG_MARKER)) {
// CON-634: This is an obscure corner case where the surrounding
// quotes on the original tsymbol were necessary to escape a
// keyword, but got dropped because of the logic in
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Copyright (c) 2013-2019 Cinchapi Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.cinchapi.concourse.bugrepro;

import org.junit.Assert;
import org.junit.Test;

import com.cinchapi.concourse.lang.Criteria;
import com.cinchapi.concourse.test.ConcourseIntegrationTest;
import com.cinchapi.concourse.thrift.Operator;

/**
* Repro of http://jira.cinchapi.com/browse/CON-635
*
* @author Jeff Nelson
*/
public class CON635 extends ConcourseIntegrationTest {

@Test
public void repro1() {
client.find(Criteria.where().key("foo").operator(Operator.EQUALS)
.value("Foo’s"));
Assert.assertTrue(true); // lack of Exception means test passes
}

@Test
public void repor2() {
client.find(Criteria.where().key("foo").operator(Operator.EQUALS)
.value("“A and B”"));
Assert.assertTrue(true); // lack of Exception means test passes
}

}