-
Notifications
You must be signed in to change notification settings - Fork 16
Issue 6091: Remove Facebook collections library #6129
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
base: develop
Are you sure you want to change the base?
Conversation
|
Could we replace this with a commons lang3 Pair? They have ImmutablePair and MutablePair as required. |
|
Personally I'd rather avoid using a Pair-type data structure at all, in favour of something with a more descriptive name. Using a Java record lets you achieve that with very little boilerplate, something like this: public record FieldValue<T>(String fieldName, T value) {
}I'd keep that in the Athena code, next to where it's used, maybe nest it in the class and make it static. |
| */ | ||
| package sleeper.athena.record; | ||
|
|
||
| public record FieldAtDimension(int dimension, Object value) { |
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.
This is field AT dimension whereas other is field AS String. Is that correct?
| * | ||
| * @param array1 first ByteArray object | ||
| * @param array2 second ByteArray object | ||
| * @return true is equal |
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.
true if* equal
| * Method for checking equality versus generic object declaration. | ||
| * | ||
| * @param o object to compare versus | ||
| * @return true is equal |
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.
true if* equal
|
|
||
| import static org.assertj.core.api.Assertions.assertThat; | ||
|
|
||
| public class ByteArrayTest { |
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.
Is it worth testing equals validation for one null one not and for the contents of the arrays being equal?
ca61688
left a comment
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.
Few small comments otherwise looks good
Make sure you have checked all steps below.
Issue
Feature". Note that before an issue is finished, you can still make a pull request by raising a separate issue
for your progress.
Tests
Documentation
separate issue for that below.