/** * Extract the login details from a URI, raising an exception if * the URI contains them. * @param name URI of the filesystem, can be null * @throws IllegalArgumentException if there is a secret in the URI. */ public static void rejectSecretsInURIs(URI name) { Login login = extractLoginDetails(name); Preconditions.checkArgument(!login.hasLogin(), LOGIN_WARNING); }