In the resource browser or group browser, if you type any valid search expression it will filter the result list. However, if you add any whitespace to the end of it, the parser thinks the last search term is NULL, which bombs during query translation. As a result, the entire search expression is mark as invalid, and no results are filtered at all.
commit 5859a837d07167c1ea05ff08b501ab8104b0bf37 Author: Joseph Marques <joseph> Date: Thu Jul 8 18:56:10 2010 -0400 BZ-610107: ensure search expression for translation into JPQL is whitespace-trimmed and non-null
Testing on build 139 of ci-rhq-release hudson job. In the search bar I first tried, type="JBossAS Server" which listed my one and only jboss instance in inventory, my rhq server. I then tried, type="JBossAS Server " No results were yielded, and I did not see any errors in the log. I then tried, type!="JBossAS Server" and it returned a number of results which excluded JBossAS Server. Next I tried, type="" and I saw the following error message in the server log, ERROR [org.rhq.enterprise.server.util.CriteriaQueryGenerator] Could not get JPQL translation for 'type=""': org.antlr.runtime.tree.RewriteEmptyStreamException:rule doubleQuotedValue but results were returned. I repeated the search strings again getting the same results. On the platforms subtab I also tried, category="platform " which resulted in the following error in the server log, ERROR [org.rhq.enterprise.server.util.CriteriaQueryGenerator] Could not get JPQL translation for 'category="platform "': java.lang.IllegalArgumentException:No enum of type 'ResourceCategory' with name matching 'platform ' but my one and only platform in inventory was returned. I then tried category="platform", and I got the same result without any error message in the log.
I have verified with Joseph that the error messages in the logs are in fact expected. I have also tested without his fix, and that winds up displaying the error message in the UI as well. Marking this verified.
Mass-closure of verified bugs against JON.