Permalink
Browse files

Liferay compatibility

  • Loading branch information...
Miguel Ángel Júlvez
Miguel Ángel Júlvez committed Feb 25, 2017
1 parent 03cb45b commit 3fa246f5c69fbfcd7272686a9704959fb9691d31
Showing with 6 additions and 1 deletion.
  1. +6 −1 probe/core/src/main/java/org/jboss/weld/probe/ProbeFilter.java
@@ -281,7 +281,12 @@ private Resource matchResource(String[] resourcePathParts) {
* @return the array of resource path parts or <code>null</code> if the given URI does not represent a Probe resource
*/
static String[] getResourcePathParts(String requestUri, String contextPath) {
final String path = requestUri.substring(contextPath.length(), requestUri.length());
final String path;
if (contextPath.length() > requestUri.length()) {
path = requestUri;
} else {
path = requestUri.substring(contextPath.length(), requestUri.length());
}
if (path.startsWith(REST_URL_PATTERN_BASE)) {
return Resource.splitPath(path.substring(REST_URL_PATTERN_BASE.length(), path.length()));
}

0 comments on commit 3fa246f

Please sign in to comment.