Skip to content

Conversation

@shokakucarrier
Copy link
Member

No description provided.

finally
{
IOUtils.closeQuietly( resources );
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to recommend to use try(resource) instead of this finally.

    String url = UrlUtils.buildUrl("/folo/admin/batch/delete");
    try (HttpResources resources = http.postRaw( url, request ))
    {
        if ( resources.getStatusCode() != HttpStatus.SC_OK )
        {
            throw new IndyClientException( resources.getStatusCode(), "Error deleting files: %s",
                                           new IndyResponseErrorDetails( resources.getResponse() ) );
        }
    }

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK I'll make a change

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ligangty I've changed it and there is nothing more that I can enhance

@shokakucarrier shokakucarrier merged commit 1aa65cc into Commonjava:main Mar 11, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants