Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[DUOS-2781][DUOS-2782] DAC rejects + accepts datasets #2215
[DUOS-2781][DUOS-2782] DAC rejects + accepts datasets #2215
Changes from all commits
a11f7e3
b4580e3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
It looks like these fields can be declared as
final
, since they're not modified once the object is constructed. If they were, then this could become arecord
: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 like the idea of moving to record classes, this is a pretty old part of the code base.
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.
It looks this use of
Objects.isNull()
is common in this codebase, and it works, but it wasn't intended for this use. It was intended to be used as a predicate, such as for a streaming operation. See https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Objects.html#isNull(java.lang.Object). Personally I would compare againstnull
directly instead:If you do want to use an
Objects
method, I would usenonNull()
instead as then you don't have to negate the result: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.
Thanks for the link to the doc, don't think I've ever read that. I've been suggesting the
Objects
methods for some time now.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.
If you'd rather not compare against
null
directly, a lot of people like usingOptional.ofNullable()
instead. So you'd write something like: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 the phrase
submitted to the ${dacName} by ${dataSubmitterName} for management of future data access requests
is an appositive clause so it also should have commas around it, in addition todatasetName
since it's also an appositive forYour dataset
. Also maybe it should be split into two sentences with a period at the end.As I understand it, the rationale for separating the appositive clause like this is to make it easer for a reader to find the verb and direct object of a sentence.
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.
The language is specified by product - I'd prefer to leave this decision to @solideoglori for language choice in these cases.
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.
User
has a constructor that can be used hereThere 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.
A nice alias for
times(0)
isnever()
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.
Nice