@Deprecated
    @RestrictedSince("1.651.2 / 2.3")
    @Restricted(NoExternalUse.class)
    public static boolean isAbsoluteUri(@NonNull String uri) {
        int idx = uri.indexOf(':');
        if (idx < 0)  return false;   // no ':'. can't be absolute

        // #, ?, and / must not be before ':'
        return idx < _indexOf(uri, '#') && idx < _indexOf(uri, '?') && idx < _indexOf(uri, '/');
    }
@Test
    @SuppressWarnings("deprecation")
    public void testIsAbsoluteUri() {
        assertTrue(Util.isAbsoluteUri("http://foobar/"));
        assertTrue(Util.isAbsoluteUri("mailto:kk@kohsuke.org"));
        assertTrue(Util.isAbsoluteUri("d123://test/"));
        assertFalse(Util.isAbsoluteUri("foo/bar/abc:def"));
        assertFalse(Util.isAbsoluteUri("foo?abc:def"));
        assertFalse(Util.isAbsoluteUri("foo#abc:def"));
        assertFalse(Util.isAbsoluteUri("foo/bar"));
    }