mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-10 14:11:58 +00:00
ACS-9981 removed invalid T function import in Parameters (#3499)
This commit is contained in:
@@ -27,7 +27,6 @@ package org.alfresco.rest.framework.resource.parameters;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.springframework.extensions.webscripts.WebScriptRequest;
|
||||
|
||||
import org.alfresco.rest.framework.core.exceptions.InvalidArgumentException;
|
||||
@@ -69,7 +68,7 @@ public interface Parameters
|
||||
* @return The Parameter value
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
T getParameter(String parameterName, Class<T> clazz) throws InvalidArgumentException;
|
||||
<T> T getParameter(String parameterName, Class<T> clazz) throws InvalidArgumentException;
|
||||
|
||||
/**
|
||||
* Returns a representation of the Paging of collections of resources, with skip count and max items. See {@link Paging} Specified by the "skipCount" and "maxItems" request parameters.
|
||||
|
@@ -31,7 +31,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.beanutils.ConvertUtils;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.springframework.extensions.webscripts.WebScriptRequest;
|
||||
|
||||
import org.alfresco.repo.content.MimetypeMap;
|
||||
@@ -231,7 +230,7 @@ public class Params implements Parameters
|
||||
}
|
||||
|
||||
@Override
|
||||
public T getParameter(String parameterName, Class<T> clazz) throws InvalidArgumentException
|
||||
public <T> T getParameter(String parameterName, Class<T> clazz) throws InvalidArgumentException
|
||||
{
|
||||
String param = getParameter(parameterName);
|
||||
if (param == null)
|
||||
@@ -239,7 +238,7 @@ public class Params implements Parameters
|
||||
Object obj = ConvertUtils.convert(param, clazz);
|
||||
if (obj != null && obj.getClass().equals(clazz))
|
||||
{
|
||||
return (T) obj;
|
||||
return clazz.cast(obj);
|
||||
}
|
||||
throw new InvalidArgumentException(InvalidArgumentException.DEFAULT_MESSAGE_ID, new Object[]{parameterName});
|
||||
}
|
||||
|
Reference in New Issue
Block a user