Skip to content

[feature] Facility for listing providers and algorithms #5

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

adamretter
Copy link
Member

No description provided.


CryptoError(String code, String message) {
CryptoError(final String code, final String message, @Nullable final Class<? extends Throwable>... describesExceptions) {
Copy link

Choose a reason for hiding this comment

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

Just out of curiosity:
The parameter is described as @Nullable Class<? extends Thowable>... describesExceptions
But the property is @Nullable final Class<? extends Throwable>[] describesExceptions;
What are the three dots for? Can they be used interchangeably?

Copy link
Member Author

Choose a reason for hiding this comment

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

What are the three dots for

The ellipsis indicates a varargs of the specified type.

Can they be used interchangeably?

No. Ellipsis are only valid on the last arg of a parameter list, and you have to be careful on typing. Consider... void fn(String... x), is that requesting an array of string or 1+n strings, how you call fn is important.

Copy link

Choose a reason for hiding this comment

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

OK, so very much like the ...rest argument in JavaScript. Interesting! Thanks for clarifying this.

Copy link

@line-o line-o left a comment

Choose a reason for hiding this comment

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

That was a lot to take in. It looks good to me. Certainly a refactoring for the better plus additional features.

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