common/src/main/java/org/jboss/pnc/common/util/StringUtils.java
public static String stripTrailingSlash(String string) {
        if (string == null) {
            return null;
        }
        if (string.startsWith("/")) {
            string = string.substring(1, string.length());
        }
        return string;
    }
public static String stripTrailingSlash(String string) {
        if (string == null) {
            return null;
        }
        if (string.startsWith("/")) {
            string = string.substring(1, string.length());
        }
        return string;
    }
Remove ending slash if present and return the string without ending slash

@param string
@return