(PathMatcher pathMatcher, String fullMethodName)
| 158 | } |
| 159 | |
| 160 | private static boolean matchPath(PathMatcher pathMatcher, String fullMethodName) { |
| 161 | if (pathMatcher.path() != null) { |
| 162 | return pathMatcher.caseSensitive() |
| 163 | ? pathMatcher.path().equals(fullMethodName) |
| 164 | : pathMatcher.path().equalsIgnoreCase(fullMethodName); |
| 165 | } else if (pathMatcher.prefix() != null) { |
| 166 | return pathMatcher.caseSensitive() |
| 167 | ? fullMethodName.startsWith(pathMatcher.prefix()) |
| 168 | : fullMethodName.toLowerCase(Locale.US).startsWith( |
| 169 | pathMatcher.prefix().toLowerCase(Locale.US)); |
| 170 | } |
| 171 | return pathMatcher.regEx().matches(fullMethodName); |
| 172 | } |
| 173 | |
| 174 | @Nullable |
| 175 | private static String getHeaderValue(Metadata headers, String headerName) { |
no test coverage detected