Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ErrorOptions #25338

Merged
merged 4 commits into from
Nov 16, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions eng/code-quality-reports/src/main/resources/revapi/revapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,16 @@
"code": "java.method.added",
"new": "method java.lang.Class<T> com.azure.core.util.serializer.TypeReference<T>::getJavaClass()",
"justification": "New method added to TypeReference in azure-core."
},
{
"code": "java.method.visibilityReduced",
"new": "method com.azure.core.http.rest.RequestOptions com.azure.core.http.rest.RequestOptions::setErrorOptions(java.util.EnumSet<com.azure.core.http.rest.ErrorOptions>)",
"justification": "The use case for ErrorOptions is not yet clear. It will be added later if there are enough data points to suggest this is needed."
},
{
"code": "java.class.visibilityReduced",
"new": "enum com.azure.core.http.rest.ErrorOptions",
"justification": "The use case for ErrorOptions is not yet clear. It will be added later if there are enough data points to suggest this is needed."
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* Determines how errors are handled by requests using {@link RequestOptions}.
*/
public enum ErrorOptions {
enum ErrorOptions {
/**
* Throw exceptions when an HTTP response with a status code indicating an error (400 or above) is received.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public RequestOptions setBody(BinaryData requestBody) {
* @throws IllegalArgumentException If both {@link ErrorOptions#THROW} and {@link ErrorOptions#NO_THROW} are
* included in {@code errorOptions}.
*/
public RequestOptions setErrorOptions(EnumSet<ErrorOptions> errorOptions) {
RequestOptions setErrorOptions(EnumSet<ErrorOptions> errorOptions) {
Objects.requireNonNull(errorOptions, "'errorOptions' cannot be null.");

if (errorOptions.contains(ErrorOptions.THROW) && errorOptions.contains(ErrorOptions.NO_THROW)) {
Expand Down