Skip to content

Commit

Permalink
briandilley#305: mark com.googlecode.jsonrpc4j.JsonRpcServer#handle(j…
Browse files Browse the repository at this point in the history
…avax.portlet.ResourceRequest, javax.portlet.ResourceResponse) as deprecated

Added @deprecated marker and wrote a comment in the Javadoc

Signed-off-by: cyb3r4nt <[email protected]>
  • Loading branch information
cyb3r4nt committed Jan 19, 2023
1 parent 3706d07 commit e9fda1d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ dependencies {
implementation 'net.iharder:base64:2.3.9'
implementation "org.slf4j:slf4j-api:${slf4jVersion}"


// TODO: remove deprecated portlet-api when support is removed from the code
servletSupportImplementation 'javax.portlet:portlet-api:3.0.1'
servletSupportImplementation 'javax.servlet:javax.servlet-api:4.0.1'

Expand Down
7 changes: 6 additions & 1 deletion src/main/java/com/googlecode/jsonrpc4j/JsonRpcServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,17 @@ public JsonRpcServer(Object handler) {
}

/**
* Handles a portlet request.
* (Deprecated) Handles a portlet request.
* <p>
* Note: this method is marked for removal.
* Please use {@link JsonRpcBasicServer#handleRequest(InputStream, OutputStream)} instead,
* and propagate request and response data streams to it.
*
* @param request the {@link ResourceRequest}
* @param response the {@link ResourceResponse}
* @throws IOException on error
*/
@Deprecated
public void handle(ResourceRequest request, ResourceResponse response) throws IOException {
logger.debug("Handing ResourceRequest {}", request.getMethod());
response.setContentType(contentType);
Expand Down

0 comments on commit e9fda1d

Please sign in to comment.