Merged HEAD (5.2) to 5.2.N (5.2.1)

126416 jkaabimofrad: 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/BRANCHES/DEV/5.2.N/root@126762 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ancuta Morarasu
2016-05-11 11:14:25 +00:00
parent fc7cea8ad5
commit a7188e4704

View File

@@ -316,9 +316,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());
}
}