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

Applied APIView suggestion for KV Admin. #22381

Merged
merged 4 commits into from
Jun 18, 2021
Merged

Applied APIView suggestion for KV Admin. #22381

merged 4 commits into from
Jun 18, 2021

Conversation

vcolin7
Copy link
Member

@vcolin7 vcolin7 commented Jun 18, 2021

And other small changes.

@ghost ghost added the KeyVault label Jun 18, 2021
try {
return fromString(new URL(url).getPath(), KeyVaultRoleScope.class);
} catch (MalformedURLException e) {
throw new RuntimeException(e);
Copy link
Member

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?

Copy link
Member Author

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?

Copy link
Member Author

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

Copy link
Member

@srnagar srnagar Jun 18, 2021

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.

@mitchdenny
Copy link
Contributor

/azp run java - keyvault

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vcolin7 vcolin7 enabled auto-merge (squash) June 18, 2021 19:06
@vcolin7
Copy link
Member Author

vcolin7 commented Jun 18, 2021

/check-enforcer evaluate

@benbp
Copy link
Member

benbp commented Jun 18, 2021

/check-enforcer reset

@benbp
Copy link
Member

benbp commented Jun 18, 2021

/check-enforcer evaluate

@vcolin7
Copy link
Member Author

vcolin7 commented Jun 18, 2021

/check-enforcer override

@vcolin7 vcolin7 merged commit b2931f9 into Azure:main Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants