Skip to content

Commit

Permalink
Merge pull request #29474 from tjwatson/fixHttpMonitorCheckpoint
Browse files Browse the repository at this point in the history
Fix http monitor checkpoint
  • Loading branch information
tjwatson authored Aug 24, 2024
2 parents 6e7be7c + 800ce34 commit ed7a428
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
*******************************************************************************/
package io.openliberty.http.monitor;

import javax.servlet.http.HttpServletMapping;

import com.ibm.ws.ffdc.annotation.FFDCIgnore;
import com.ibm.ws.webcontainer40.osgi.webapp.WebAppDispatcherContext40;
import com.ibm.wsspi.webcontainer.webapp.IWebAppDispatcherContext;
Expand All @@ -24,7 +26,8 @@ public static String getPattern(IWebAppDispatcherContext webAppdispatcherContext
if (isServlet4Up) {
if (webAppdispatcherContext instanceof WebAppDispatcherContext40) {
WebAppDispatcherContext40 webAppDispatcherContext40 = (WebAppDispatcherContext40) webAppdispatcherContext;
return webAppDispatcherContext40.getServletMapping().getPattern();
HttpServletMapping mapping = webAppDispatcherContext40.getServletMapping();
return mapping == null ? null : mapping.getPattern();
}
return null;
} else {
Expand All @@ -44,7 +47,8 @@ public static String getMatchValue(IWebAppDispatcherContext webAppdispatcherCont
if (isServlet4Up) {
if (webAppdispatcherContext instanceof WebAppDispatcherContext40) {
WebAppDispatcherContext40 webAppDispatcherContext40 = (WebAppDispatcherContext40) webAppdispatcherContext;
return webAppDispatcherContext40.getServletMapping().getMatchValue();
HttpServletMapping mapping = webAppDispatcherContext40.getServletMapping();
return mapping == null ? null : mapping.getMatchValue();
}
return null;
} else {
Expand Down

0 comments on commit ed7a428

Please sign in to comment.