Avoid using the deprecated HttpServletRequestWrapper isRequestedSessionIdFromUrl method

This rule flags the following deprecated method from the javax.servlet.http.HttpServletRequestWrapper class:

This method is deprecated in JavaEE8 and can be removed in a future release.

HttpServletRequestWrapper.isRequestedSessionIdFromUrl() should no longer be used and the preferred replacement is isRequestedSessionIdFromURL() . The HttpServletRequestWrapper.isRequestedSessionIdFromURL() method provides all of the same functionality as isRequestedSessionIdFromUrl() .

Use the isRequestedSessionIdFromURL() method to be compatible with JavaEE8 on Liberty.

The automated fix replaces calls to isRequestedSessionIdFromUrl() with calls to the isRequestedSessionIdFromURL() method. For example, the following code

import javax.servlet.http.HttpServletRequestWrapper; import javax.servlet.http.HttpServletRequest;
...
HttpServletRequestWrapper requestWrapper = new HttpServletRequestWrapper((HttpServletRequest) request);
requestWrapper.isRequestedSessionIdFromUrl();

is replaced by

import javax.servlet.http.HttpServletRequestWrapper; import javax.servlet.http.HttpServletRequest;
...
HttpServletRequestWrapper requestWrapper = new HttpServletRequestWrapper((HttpServletRequest) request);
requestWrapper.isRequestedSessionIdFromURL();

Copy the custom configuration to your application build file to enable the fix automation.