-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Enable XLint warnings for ML #44285
Enable XLint warnings for ML #44285
Conversation
loads of unchecked warnings in test left
Pinging @elastic/ml-core |
Pinging @elastic/es-core-infra |
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.
❤️
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
@@ -166,7 +166,7 @@ public void testProcess_GivenTwoBatchesWhereFirstEndsWithSkippedRow() throws IOE | |||
DataFrameDataExtractor.Row normalRow2 = newRow(newHit(dataDoc), dataValues, 2); | |||
DataFrameDataExtractor.Row skippedRow = newRow(newHit("{}"), null, 3); | |||
DataFrameDataExtractor.Row normalRow3 = newRow(newHit(dataDoc), dataValues, 4); | |||
givenDataFrameBatches(Arrays.asList(normalRow1, normalRow2, skippedRow), Arrays.asList(normalRow3)); | |||
givenDataFrameBatches(List.of(Arrays.asList(normalRow1, normalRow2, skippedRow), Arrays.asList(normalRow3))); |
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.
Could you use List.of everywhere like you did in line 217?
BTW, are you going to backport it to 7.x? This would require changing List.of to Arrays.asList everywhere.
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.
Yes this will be backported to 7.x which is why I didn't use List.of
everywhere as I would have to undo the change in the backport.
I thought this partial change helped readability
@elasticmachine update branch |
Removes the warning suppression -Xlint:-deprecation,-rawtypes,-serial,-try,-unchecked. Many warnings were unchecked warnings in the test code often because of the use of mocks. These are suppressed with @SuppressWarning
Removes the warning suppression
-Xlint:-deprecation,-rawtypes,-serial,-try,-unchecked
, deprecation is disabled by default for the entire project.Most of the warnings were
unchecked
warnings in the test code often because of the use of mocks. These are suppressed with@SuppressWarning
For #40366