We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am able to produce an error definition with the same param name used both in unsafe-args and safe-args.
unsafe-args
safe-args
Conjure-java then happily produces non-compiling java code:
public static ServiceException myError( Throwable cause, int param, List<String> param) { return new ServiceException( MY_ERROR, cause, SafeArg.of("param", param), UnsafeArg.of("param", param)); }
I feel like the IR validation should protect against this.
I'm not sure whether it would be enough to change the .toSet() here to a .toList(): https://github.com/palantir/conjure/blob/master/conjure-core/src/main/java/com/palantir/conjure/defs/validator/ErrorDefinitionValidator.java#L34 (and change the unique names validator to take a Collection<>)?
.toSet()
.toList()
Collection<>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What happened?
I am able to produce an error definition with the same param name used both in
unsafe-args
andsafe-args
.Conjure-java then happily produces non-compiling java code:
What did you want to happen?
I feel like the IR validation should protect against this.
I'm not sure whether it would be enough to change the
.toSet()
here to a.toList()
: https://github.com/palantir/conjure/blob/master/conjure-core/src/main/java/com/palantir/conjure/defs/validator/ErrorDefinitionValidator.java#L34 (and change the unique names validator to take aCollection<>
)?The text was updated successfully, but these errors were encountered: