-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Applied APIView suggestion for KV Admin. #22381
Conversation
try { | ||
return fromString(new URL(url).getPath(), KeyVaultRoleScope.class); | ||
} catch (MalformedURLException e) { | ||
throw new RuntimeException(e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should still document that an exception is thrown by the method even if it isn't checked. Also, should this be an IllegalArgumentException
to be more targeted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think IllegalArgumentException
is fine but since it a static method I'm not sure if( we should use a logger or not. I don't think we want to have static loggers. Any thoughts @srngar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not using a logger for now, but did change to the exception type you suggested
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IllegalArgumentException should be logged and thrown here. You can use static final loggers in static methods.
/azp run java - keyvault |
Azure Pipelines successfully started running 1 pipeline(s). |
/check-enforcer evaluate |
/check-enforcer reset |
/check-enforcer evaluate |
/check-enforcer override |
And other small changes.