Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#305: Deprecate portlet-api support in the JsonRpcServer #307

Merged
merged 1 commit into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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