-
Notifications
You must be signed in to change notification settings - Fork 227
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
Incremental PR analysis: Implement HashProvider #6506
Conversation
8b92042
to
9bc5eda
Compare
Kudos, SonarCloud Quality Gate passed! |
Kudos, SonarCloud Quality Gate passed! |
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.
LGTM
import java.security.NoSuchAlgorithmException; | ||
|
||
public class HashProvider { | ||
public byte[] computeHash(Path filePath) throws NoSuchAlgorithmException, IOException { |
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.
Open question: Isn't this one going to make our life easier?
public byte[] computeHash(Path filePath) throws NoSuchAlgorithmException, IOException { | |
public byte[] computeHash(Path filePath) throws Throwable { |
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.
With this the contract is clear. We say exactly what kind of exceptions we throw.
When handling the exception can use the base type Throwable
or Exception
or even be explicit, depending on the needs.
Part of #6486