From: Aron Roberts Date: Fri, 17 May 2013 03:21:25 +0000 (-0700) Subject: CSPACE-6001: Switch from allowing only an ending 'stop' character (by default, a... X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=9233dec42d57e5a64f086a500a9d3b7ba93f2adb;p=tmp%2Fjakarta-migration.git CSPACE-6001: Switch from allowing only an ending 'stop' character (by default, a vertical pipe character) to allowing both leading and ending 'anchor' characters (by default, a carat). The leading anchor character is enabled only when a tenant is configured to automatically include a leading wildcard. --- diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authority/authority.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authority/authority.xml index 43dc5dec0..42748c70f 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authority/authority.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authority/authority.xml @@ -227,11 +227,11 @@ authority/res/personItemsContainingWord2.res.xml - - + + 200 GET - /cspace-services/personauthorities/_ALL_/items?pt=${createPersonAuthority1.word1}%7C + /cspace-services/personauthorities/_ALL_/items?pt=${createPersonAuthority1.word1}%5E authority/res/personItemsOnlyWord1.res.xml diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RepositoryJavaClientImpl.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RepositoryJavaClientImpl.java index b2843cf40..c764a3c33 100644 --- a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RepositoryJavaClientImpl.java +++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RepositoryJavaClientImpl.java @@ -17,11 +17,7 @@ package org.collectionspace.services.nuxeo.client.java; import java.io.Serializable; -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; import java.sql.SQLException; -import java.sql.Statement; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; @@ -114,7 +110,7 @@ public class RepositoryJavaClientImpl implements RepositoryClient 0) { + if (partialTerm.endsWith(USER_SUPPLIED_ANCHOR_CHAR) && lastCharPos > 0) { partialTerm = partialTerm.substring(0, lastCharPos); } else { // Otherwise, automatically add a trailing wildcard