Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)

121767 jvonka: REST fwk - fix MapBasedQueryWalker to also allow requested String type (in addition to Boolean, Integer, Date)
   - found whilst implementing nodeType filtering
   RA-741, RA-685, RA-634


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126416 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jamal Kaabi-Mofrad
2016-05-10 10:50:39 +00:00
parent ef15b3e765
commit 3980848d1e

View File

@@ -309,9 +309,9 @@ public class MapBasedQueryWalker extends WalkerCallbackAdapter
if (stringValue != null)
{
result = ConvertUtils.convert(stringValue, returnType);
if (result instanceof String)
if ((result instanceof String) && (! returnType.equals(String.class)))
{
// If a string is returned, no converter has been found
// If a string is returned, no converter has been found (for non-String return type)
throw new IllegalArgumentException("Unable to convert parameter to type: " + returnType.getName());
}
}