-
Notifications
You must be signed in to change notification settings - Fork 365
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
Test: hadoopfs tests remove the use of @Value.Immutable #8572
base: master
Are you sure you want to change the base?
Conversation
- Added ImmutablePagination class to handle pagination parameters in tests. - Updated test setup to use ImmutablePagination class for pagination parameters. - This change removes the use of @Value.Immutable in the test and works with latest Java compilers.
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!
But frankly I am not sure why this would be required. E.g. the docs (and even the changelog) say nothing about not working with a modern JVM. Ideally we would link to an issue that says immutable Values don't work with a modern Java. Maybe just bump to 2.10.1? Or are we using it incorrectly???
I am not a fan of writing generated code by hand. For instance the code generated by immutable.Value gives actual value types; the type here does not. "Value type" means, for instance, the existence of working equals and hashCode methods. You also get any number of great routines; see here.
@@ -0,0 +1,56 @@ | |||
package io.lakefs; |
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 don't understand: this used to be auto-generated; is this now manually written?
@@ -0,0 +1,56 @@ | |||
package io.lakefs; | |||
|
|||
import com.google.common.base.Optional; |
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.
Can we use the standard java.util.Optional instead? (Maybe not if code is generated with a different Optional...)
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.
Sure, I thought the code prefered Google's package so we left it.
test: Add ImmutablePagination to remove the use of Value.Immutable
with latest Java compilers.