private static String normalizePath(String path, boolean isServicePath) {
            if (path.isEmpty()) {
                return path;
            }

            if (path.charAt(0) == '/') {
                path = path.substring(1);
            }
            if (path.isEmpty()) {
                return path;
            }

            if (isServicePath) {
                final int lastCharIndex = path.length() - 1;
                if (path.charAt(lastCharIndex) == '/') {
                    path = path.substring(0, lastCharIndex);
                }
            }

            return path;
        }
A registry of the implementation methods bound to a {@link GrpcService}. Used for method dispatch and
documentation generation.
grpc/src/main/java/com/linecorp/armeria/server/grpc/HandlerRegistry.java