Skip to content

Commit

Permalink
Removed unused method from IWebSerialDeserial
Browse files Browse the repository at this point in the history
  • Loading branch information
bitstorm committed Oct 26, 2016
1 parent 5082670 commit 61bf223
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,4 @@ public <T> T requestToObject(WebRequest request, Class<T> argClass, String mimeT
* @return true if the MIME type is supported, false otherwise.
*/
public boolean isMimeTypeSupported(String mimeType);

/**
* Returns the {@link IObjectSerialDeserial} for the specific MIME type
*
* @param mimeType
* @return
* the appropriate IObjectSerialDeserial.
*/
public IObjectSerialDeserial<?> getIObjectSerialDeserial(String mimeType);
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import org.apache.wicket.request.http.WebRequest;
import org.apache.wicket.request.http.WebResponse;
import org.wicketstuff.rest.contenthandling.IObjectSerialDeserial;
import org.wicketstuff.rest.contenthandling.IWebSerialDeserial;

/**
Expand Down Expand Up @@ -74,19 +73,4 @@ public boolean isMimeTypeSupported(String mimeType)
{
return serialsDeserials.get(mimeType) != null;
}

@Override
public IObjectSerialDeserial<?> getIObjectSerialDeserial(String mimeType)
{
IWebSerialDeserial webSerialDeserial = serialsDeserials.get(mimeType);

if(webSerialDeserial == null)
{
return null;
}

IObjectSerialDeserial<?> objectSerialDeserial = webSerialDeserial.getIObjectSerialDeserial(mimeType);

return objectSerialDeserial;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

import java.io.IOException;

import javax.servlet.ServletResponse;

import org.apache.wicket.WicketRuntimeException;
import org.apache.wicket.request.http.WebRequest;
import org.apache.wicket.request.http.WebResponse;
Expand All @@ -28,6 +26,8 @@
import org.wicketstuff.rest.contenthandling.mimetypes.RestMimeTypes;
import org.wicketstuff.rest.utils.http.HttpUtils;

import javax.servlet.ServletResponse;

/**
* Web serializer/deserailizer that works with a textual format.
*
Expand Down Expand Up @@ -95,17 +95,6 @@ final public boolean isMimeTypeSupported(String mimeType)
return RestMimeTypes.TEXT_PLAIN.equals(mimeType) || this.mimeType.equals(mimeType);
}

@Override
public IObjectSerialDeserial<?> getIObjectSerialDeserial(String mimeType)
{
if (!isMimeTypeSupported(mimeType))
{
return null;
}

return objectSerialDeserial;
}

/**
* Sets the charset for the current response.
*
Expand Down

0 comments on commit 61bf223

Please sign in to comment.