chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1787376 - /chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/query/InMemoryQueryProcessor.java
Date Fri, 17 Mar 2017 13:37:49 GMT
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();



Mime
View raw message