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

amagyar pushed a commit to branch branch-2.6
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.6 by this push:
     new 58288fb  AMBARI-25178. [Knox TP] Config Group selection is empty while 
Adding Service in Ambari (amagyar) (#2847)
58288fb is described below

commit 58288fb3e58428b432503aa7fea6a1ccbd93ff09
Author: Attila Magyar <m.magy...@gmail.com>
AuthorDate: Wed Mar 6 12:33:22 2019 +0100

    AMBARI-25178. [Knox TP] Config Group selection is empty while Adding 
Service in Ambari (amagyar) (#2847)
---
 .../java/org/apache/ambari/server/api/predicate/QueryLexer.java    | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/api/predicate/QueryLexer.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/api/predicate/QueryLexer.java
index 68e8102..de9b1aa 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/api/predicate/QueryLexer.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/api/predicate/QueryLexer.java
@@ -18,6 +18,8 @@
 
 package org.apache.ambari.server.api.predicate;
 
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
 import java.util.*;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -127,6 +129,11 @@ public class QueryLexer {
    * @throws InvalidQueryException if the query is invalid
    */
   public Token[] tokens(String exp, Collection<String> ignoreProperties) 
throws InvalidQueryException {
+    try {
+      exp = URLDecoder.decode(exp,  "UTF-8");
+    } catch (UnsupportedEncodingException e) {
+      throw new InvalidQueryException("Could not decode: " + exp, e);
+    }
     ScanContext ctx = new ScanContext();
     ctx.addPropertiesToIgnore(SET_IGNORE);
     ctx.addPropertiesToIgnore(ignoreProperties);

Reply via email to