Resolves JIRA improvement SGF-265, appropriately handling the 'new' Query result type (ResultsCollectionPdxDeserializerWrapper) introduced and returned by GemFire's Querying infrastructure in 7.0.2, breaking backwards compatibility with 7.0.1 for certain types of Queries.
This commit is contained in:
@@ -26,7 +26,9 @@ import org.springframework.util.Assert;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import com.gemstone.gemfire.cache.query.SelectResults;
|
||||
import com.gemstone.gemfire.cache.query.internal.ResultsBag;
|
||||
import com.gemstone.gemfire.cache.query.internal.ResultsCollectionPdxDeserializerWrapper;
|
||||
|
||||
/**
|
||||
* {@link GemfireRepositoryQuery} using plain {@link String} based OQL queries.
|
||||
@@ -118,6 +120,10 @@ public class StringBasedGemfireRepositoryQuery extends GemfireRepositoryQuery {
|
||||
*/
|
||||
private Collection<?> toCollection(Object source) {
|
||||
|
||||
if (source instanceof SelectResults) {
|
||||
return ((SelectResults) source).asList();
|
||||
}
|
||||
|
||||
if (source instanceof ResultsBag) {
|
||||
ResultsBag bag = (ResultsBag) source;
|
||||
return bag.asList();
|
||||
|
||||
Reference in New Issue
Block a user