From: Richard Millet Date: Wed, 9 May 2018 00:54:59 +0000 (-0700) Subject: DRYD-114: Fixed issue with timestamp conversion's regex that was assuming url encoded... X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=fc49ffcd16d9fabdb6f2a40541e3626af8730109;p=tmp%2Fjakarta-migration.git DRYD-114: Fixed issue with timestamp conversion's regex that was assuming url encoded strings. --- diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/CoreSessionWrapper.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/CoreSessionWrapper.java index e573f9f63..14459dfdf 100644 --- a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/CoreSessionWrapper.java +++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/CoreSessionWrapper.java @@ -155,12 +155,12 @@ public class CoreSessionWrapper implements CoreSessionInterface { if (query.contains("TIMESTAMP")) { StringBuffer stringBuffer = new StringBuffer(); - Pattern pattern = Pattern.compile("\\+TIMESTAMP\\+%22(.+?)%22"); + Pattern pattern = Pattern.compile("\\sTIMESTAMP\\s\"(.+?)\""); Matcher matcher = pattern.matcher(query); while (matcher.find()) { String time = matcher.group(1); - String localizedTime = toLocalTimestamp(time, true); - matcher.appendReplacement(stringBuffer, String.format("+TIMESTAMP+%%22%s%%22", localizedTime)); + String localizedTime = toLocalTimestamp(time, false); + matcher.appendReplacement(stringBuffer, String.format(" TIMESTAMP \"%s\"", localizedTime)); } matcher.appendTail(stringBuffer); result = stringBuffer.toString();