Skip to content

Commit

Permalink
Further cleanup of old / useless / deprecated stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
asoldano committed Sep 6, 2018
1 parent 975c33b commit 891bc76
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 162 deletions.
Expand Up @@ -12,15 +12,6 @@
* @version $Revision: 1 $
*/
public interface MultipartFormDataInput extends MultipartInput {
/**
* @deprecated Will be removed in the future. Use
* {@link MultipartFormDataInput#getFormDataMap()} instead.
*
* @return A parameter map containing only one value per name.
*/
@Deprecated
Map<String, InputPart> getFormData();

/**
* @return A parameter map containing a list of values per name.
*/
Expand Down
Expand Up @@ -23,24 +23,12 @@
*/
public class MultipartFormDataInputImpl extends MultipartInputImpl implements
MultipartFormDataInput {
protected Map<String, InputPart> formData = new HashMap<String, InputPart>();
protected Map<String, List<InputPart>> formDataMap = new HashMap<String, List<InputPart>>();

public MultipartFormDataInputImpl(MediaType contentType, Providers workers) {
super(contentType, workers);
}

/**
* @deprecated Will be removed in the future. Use
* {@link MultipartFormDataInputImpl#getFormDataMap()} instead.
*
* @return A parameter map containing only one value per name.
*/
@Deprecated
public Map<String, InputPart> getFormData() {
return formData;
}

public Map<String, List<InputPart>> getFormDataMap() {
return formDataMap;
}
Expand Down Expand Up @@ -80,7 +68,6 @@ protected InputPart extractPart(BodyPart bodyPart) throws IOException {
List<InputPart> list = formDataMap.get(name);
if (list == null) {
list = new LinkedList<InputPart>();
formData.put(name, currPart);
formDataMap.put(name, list);
}
list.add(currPart);
Expand Down

This file was deleted.

Expand Up @@ -72,14 +72,12 @@ public String getHeader(String name)
return proxy.getHeader(name);
}

@SuppressWarnings("unchecked")
@Override
public Enumeration<String> getHeaders(String name)
{
return proxy.getHeaders(name);
}

@SuppressWarnings("unchecked")
@Override
public Enumeration<String> getHeaderNames()
{
Expand Down
Expand Up @@ -77,13 +77,6 @@ public ResteasyDeployment createDeployment()
}


String resourceMethodInterceptors = getParameter(ResteasyContextParameters.RESTEASY_RESOURCE_METHOD_INTERCEPTORS);

if (resourceMethodInterceptors != null)
{
throw new RuntimeException(Messages.MESSAGES.noLongerASupportedContextParam(ResteasyContextParameters.RESTEASY_RESOURCE_METHOD_INTERCEPTORS));
}

String resteasySecurity = getParameter(ResteasyContextParameters.RESTEASY_ROLE_BASED_SECURITY);
if (resteasySecurity != null) {
boolean useResteasySecurity = parseBooleanParam(ResteasyContextParameters.RESTEASY_ROLE_BASED_SECURITY, resteasySecurity);
Expand Down
Expand Up @@ -9,11 +9,6 @@
public interface ResteasyContextParameters {
String RESTEASY_PROVIDERS = "resteasy.providers";

/**
* this is deprecated
*/
String RESTEASY_RESOURCE_METHOD_INTERCEPTORS = "resteasy.resource.method.interceptors";

String RESTEASY_USE_BUILTIN_PROVIDERS = "resteasy.use.builtin.providers";
String RESTEASY_SCAN_PROVIDERS = "resteasy.scan.providers";
String RESTEASY_SCAN = "resteasy.scan";
Expand Down
Expand Up @@ -27,8 +27,7 @@ public enum ParamType
UNKNOWN,
// resteasy specific
FORM,
QUERY,
SUSPEND // deprecated
QUERY
}

protected ResourceClass resourceClass;
Expand All @@ -38,7 +37,6 @@ public enum ParamType
protected String paramName;
protected boolean encoded;
protected String defaultValue;
protected long suspendTimeout; // deprecated

protected Parameter(ResourceClass resourceClass, Class<?> type, Type genericType)
{
Expand Down Expand Up @@ -82,11 +80,6 @@ public String getDefaultValue()
return defaultValue;
}

public long getSuspendTimeout()
{
return suspendTimeout;
}

public abstract AccessibleObject getAccessibleObject();
public abstract Annotation[] getAnnotations();
}
Expand Up @@ -450,19 +450,11 @@ public ResourceMethodParameterBuilder suspended()
return this;
}

public ResourceMethodParameterBuilder suspend(long timeout)
{
method.method.asynchronous = true;
parameter.paramType = Parameter.ParamType.SUSPEND;
parameter.suspendTimeout = timeout;
return this;
}

@Override
public ResourceMethodParameterBuilder fromAnnotations()
{
super.fromAnnotations();
if (param.paramType == Parameter.ParamType.SUSPEND || param.paramType == Parameter.ParamType.SUSPENDED)
if (param.paramType == Parameter.ParamType.SUSPENDED)
{
method.method.asynchronous = true;
}
Expand Down

0 comments on commit 891bc76

Please sign in to comment.