cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1418024 - /cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParser.java
Date Thu, 06 Dec 2012 18:31:18 GMT
Author: sergeyb
Date: Thu Dec  6 18:31:17 2012
New Revision: 1418024

URL: http://svn.apache.org/viewvc?rev=1418024&view=rev
Log:
Minor fix to the search code

Modified:
    cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParser.java

Modified: cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParser.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParser.java?rev=1418024&r1=1418023&r2=1418024&view=diff
==============================================================================
--- cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParser.java
(original)
+++ cxf/trunk/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParser.java
Thu Dec  6 18:31:17 2012
@@ -344,7 +344,7 @@ public class FiqlParser<T> implements Se
                         nextObject = isPrimitive ? InjectionUtils.convertStringToPrimitive(value,
returnType) 
                             : convertToDate(value);
                     } else {
-                        nextObject = Collections.singletonList(value);
+                        nextObject = getCollectionSingleton(valueType, value);
                     }
                 } else {
                     nextObject = returnType.newInstance();
@@ -355,7 +355,7 @@ public class FiqlParser<T> implements Se
                 
                 lastCastedValue = lastCastedValue == null ? valueObject : lastCastedValue;
                 if (lastTry) {
-                    return isCollection ? Collections.singletonList(lastCastedValue) : lastCastedValue;
+                    return isCollection ? getCollectionSingleton(valueType, lastCastedValue)
: lastCastedValue;
                 } 
                 
                 TypeInfo nextTypeInfo = new TypeInfo(nextObject.getClass(), getterM.getGenericReturnType());




Mime
View raw message