class AESEncryption {

    public static String decryptUriPassword(final String rawUri) {
        URI uri;
        try {
            uri = new URI(rawUri);
        } catch (URISyntaxException e) {
            LOGGER.info("Invalid URI {}", rawUri, e);
            return rawUri;
        }
        UserInfo userInfo = extractCredentials(uri);
        if (userInfo != null && userInfo.password != null) {
            try {
                userInfo.password = decrypt(userInfo.password);
                return setCredentials(uri, userInfo).toString();
            } catch (Exception e) {
                LOGGER.info("Could not decrypt URI password.");
                return rawUri;
            }
        } else {
            return rawUri;
        }
    }

    private  AESEncryption();

}