private String getMethodPath()

in geronimo-opentracing-common/src/main/java/org/apache/geronimo/microprofile/opentracing/common/microprofile/server/GeronimoOpenTracingFeature.java [131:140]


    private String getMethodPath(final ResourceInfo resourceInfo) {
        final String classPath = ofNullable(resourceInfo.getResourceClass().getAnnotation(Path.class))
                .map(Path::value).orElse("");
        final String methodPath = ofNullable(resourceInfo.getResourceMethod().getAnnotation(Path.class))
                .map(Path::value).orElse("");
        return Stream.of(classPath, methodPath)
                     .map(it -> it.substring(it.startsWith("/") ? 1 : 0, it.length() - (it.endsWith("/") ? 1 : 0)))
                     .filter(it -> !it.isEmpty())
                     .collect(joining("/", "/", ""));
    }