-
Notifications
You must be signed in to change notification settings - Fork 244
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
Use scala Int.box instead of Integer constructors #4338
Conversation
02ca291
to
8e90deb
Compare
…n JDK11 Signed-off-by: Alessandro Bellina <abellina@nvidia.com>
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.
Wow. TIL.
LGTM! lolkthxby.
build |
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.
LGTM, nit
@@ -165,7 +165,7 @@ object RapidsShuffleTestHelper extends MockitoSugar with Arm { | |||
} | |||
|
|||
def withMockContiguousTable[T](numRows: Long)(body: ContiguousTable => T): T = { | |||
val rows: Seq[Integer] = (0 until numRows.toInt).map(new Integer(_)) | |||
val rows: Seq[Integer] = (0 until numRows.toInt).map(Int.box) |
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.
nit:
val rows: Seq[Integer] = (0 until numRows.toInt).map(Int.box) | |
val rows: Seq[Integer] = (0 until numRows).map(Int.box) |
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.
sorry, that was a bad comment, scalac won't do a silent lossy conversion for us. I'll undo it
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.
@gerashegalov no problem, the constructor (I was trying not to use) also came back with the revert, but I changed it back to Int.box
. Please take another look!
Co-authored-by: Gera Shegalov <gshegalov@nvidia.com>
2015c2f
build |
Signed-off-by: Gera Shegalov <gera@apache.org>
build |
This is a small fix for the test code where it was using
new Integer
instead ofInt.box
. The integer constructors were deprecated in JDK 11, so this is not a must have for us, but it is not a great user experience to have the plugin fail to build because of this.@sameerz up to you if I should target this to 21.12. @jlowe @revans2 fyi.