You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by je...@apache.org on 2017/03/17 13:37:49 UTC

svn commit: r1787376 - /chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/query/InMemoryQueryProcessor.java

Author: jens
Date: Fri Mar 17 13:37:49 2017
New Revision: 1787376

URL: http://svn.apache.org/viewvc?rev=1787376&view=rev
Log:
InMemory small fix classcast exception when text-searching in folder

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/query/InMemoryQueryProcessor.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/query/InMemoryQueryProcessor.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/query/InMemoryQueryProcessor.java?rev=1787376&r1=1787375&r2=1787376&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/query/InMemoryQueryProcessor.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/query/InMemoryQueryProcessor.java Fri Mar 17 13:37:49 2017
@@ -678,13 +678,13 @@ public class InMemoryQueryProcessor {
         }
 
         private boolean findText(String nodeText) {
-            Content cont = (Content) so;
             String pattern = StringUtil.unescape(nodeText, "\\'-");
             if (null == pattern) {
                 throw new CmisInvalidArgumentException("Illegal Escape sequence in text search expression " + nodeText);
             }
 
-            if (so instanceof Content && cont.hasContent()) {
+            if (so instanceof Content && ((Content) so).hasContent()) {
+                Content cont = (Content) so;
                 ContentStreamDataImpl cdi = (ContentStreamDataImpl) cont.getContent();
                 if (cdi.getMimeType().startsWith("text/")) {
                     byte[] ba = cdi.getBytes();