From fc49ffcd16d9fabdb6f2a40541e3626af8730109 Mon Sep 17 00:00:00 2001 From: Richard Millet Date: Tue, 8 May 2018 17:54:59 -0700 Subject: [PATCH] DRYD-114: Fixed issue with timestamp conversion's regex that was assuming url encoded strings. --- .../services/nuxeo/client/java/CoreSessionWrapper.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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(); -- 2.47.3