You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by sh...@apache.org on 2020/09/22 12:07:10 UTC

[unomi] branch master updated: Fix errors in unit test

This is an automated email from the ASF dual-hosted git repository.

shuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/unomi.git


The following commit(s) were added to refs/heads/master by this push:
     new d693c00  Fix errors in unit test
d693c00 is described below

commit d693c00db6de34412ea8d6e2ae09aa27eaf4bf20
Author: Serge Huber <sh...@jahia.com>
AuthorDate: Tue Sep 22 14:07:02 2020 +0200

    Fix errors in unit test
---
 .../java/org/apache/unomi/graphql/schema/PropertyNameTranslator.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/schema/PropertyNameTranslator.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/schema/PropertyNameTranslator.java
index f0cc684..2a96070 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/schema/PropertyNameTranslator.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/schema/PropertyNameTranslator.java
@@ -19,11 +19,11 @@ package org.apache.unomi.graphql.schema;
 public class PropertyNameTranslator {
 
     public static String translateFromUnomiToGraphQL(final String propertyName) {
-        return propertyName.replaceAll(":", "__COLON__");
+        return propertyName.replaceAll(":", "__COLON__").replaceAll("-", "__DASH__");
     }
 
     public static String translateFromGraphQLToUnomi(final String propertyName) {
-        return propertyName.replaceAll("__COLON__", ":");
+        return propertyName.replaceAll("__DASH__", "-").replaceAll("__COLON__", ":");
     }
 
 }