Skip to content
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

Fix warnings #239

Closed
dblock opened this issue Dec 29, 2021 · 1 comment
Closed

Fix warnings #239

dblock opened this issue Dec 29, 2021 · 1 comment
Labels
good first issue Good for newcomers maintenance improves code quality, but not the product

Comments

@dblock
Copy link
Member

dblock commented Dec 29, 2021

Is your feature request related to a problem? Please describe.

Some of these warnings are probably low hanging fruit.

> Task :compileKotlin
w: /tmp/tmp5yzztbrc/index-management/src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/ManagedIndexCoordinator.kt: (392, 25): Variable 'response' is never used
w: /tmp/tmp5yzztbrc/index-management/src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/ManagedIndexConfig.kt: (181, 35): Elvis operator (?:) always returns the left operand of non-nullable type String?
w: /tmp/tmp5yzztbrc/index-management/src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/coordinator/SweptManagedIndexConfig.kt: (37, 40): Parameter 'id' is never used
w: /tmp/tmp5yzztbrc/index-management/src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/rollup/AttemptCreateRollupJobStep.kt: (101, 17): Variable 'response' is never used
w: /tmp/tmp5yzztbrc/index-management/src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/explain/ExplainAllResponse.kt: (40, 38): Unchecked cast: (Mutable)Map<String!, Any!>? to Map<String, Boolean>
w: /tmp/tmp5yzztbrc/index-management/src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/explain/TransportExplainAction.kt: (159, 78): Unchecked cast: Any? to Map<String, Any>
w: /tmp/tmp5yzztbrc/index-management/src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/util/ManagedIndexUtils.kt: (583, 64): Unchecked cast: Any? to Map<String, Any>?
w: /tmp/tmp5yzztbrc/index-management/src/main/kotlin/org/opensearch/indexmanagement/rollup/action/index/TransportIndexRollupAction.kt: (140, 24): 'roles: List<String>' is deprecated. Will be ignored, to check the roles use user field
w: /tmp/tmp5yzztbrc/index-management/src/main/kotlin/org/opensearch/indexmanagement/rollup/action/index/TransportIndexRollupAction.kt: (140, 43): 'roles: List<String>' is deprecated. Will be ignored, to check the roles use user field
w: /tmp/tmp5yzztbrc/index-management/src/main/kotlin/org/opensearch/indexmanagement/rollup/model/Rollup.kt: (197, 30): 'roles: List<String>' is deprecated. Will be ignored, to check the roles use user field
w: /tmp/tmp5yzztbrc/index-management/src/main/kotlin/org/opensearch/indexmanagement/rollup/model/metric/Average.kt: (17, 17): Parameter 'sin' is never used
w: /tmp/tmp5yzztbrc/index-management/src/main/kotlin/org/opensearch/indexmanagement/rollup/model/metric/Max.kt: (17, 17): Parameter 'sin' is never used
w: /tmp/tmp5yzztbrc/index-management/src/main/kotlin/org/opensearch/indexmanagement/rollup/model/metric/Min.kt: (17, 17): Parameter 'sin' is never used
w: /tmp/tmp5yzztbrc/index-management/src/main/kotlin/org/opensearch/indexmanagement/rollup/model/metric/Sum.kt: (17, 17): Parameter 'sin' is never used
w: /tmp/tmp5yzztbrc/index-management/src/main/kotlin/org/opensearch/indexmanagement/rollup/model/metric/ValueCount.kt: (17, 17): Parameter 'sin' is never used
w: /tmp/tmp5yzztbrc/index-management/src/main/kotlin/org/opensearch/indexmanagement/transform/action/get/TransportGetTransformsAction.kt: (82, 26): Unchecked cast: ActionListener<GetTransformsResponse> to ActionListener<ActionResponse>
w: /tmp/tmp5yzztbrc/index-management/src/main/kotlin/org/opensearch/indexmanagement/transform/action/index/TransportIndexTransformAction.kt: (149, 27): 'roles: List<String>' is deprecated. Will be ignored, to check the roles use user field
w: /tmp/tmp5yzztbrc/index-management/src/main/kotlin/org/opensearch/indexmanagement/transform/action/index/TransportIndexTransformAction.kt: (149, 49): 'roles: List<String>' is deprecated. Will be ignored, to check the roles use user field
w: /tmp/tmp5yzztbrc/index-management/src/main/kotlin/org/opensearch/indexmanagement/transform/model/Transform.kt: (136, 30): 'roles: List<String>' is deprecated. Will be ignored, to check the roles use user field
w: /tmp/tmp5yzztbrc/index-management/src/main/kotlin/org/opensearch/indexmanagement/util/ScheduledJobUtils.kt: (76, 55): Unchecked cast: List<Any> to List<Rollup>
w: /tmp/tmp5yzztbrc/index-management/src/main/kotlin/org/opensearch/indexmanagement/util/ScheduledJobUtils.kt: (77, 64): Unchecked cast: List<Any> to List<Transform>

Describe the solution you'd like
Fix warnings and turn on warnings as errors in the build.

@dblock dblock added enhancement New request good first issue Good for newcomers untriaged labels Dec 29, 2021
@bowenlan-amzn bowenlan-amzn added maintenance improves code quality, but not the product and removed enhancement New request untriaged labels Apr 15, 2022
@deshsidd deshsidd mentioned this issue Oct 5, 2022
1 task
@bowenlan-amzn
Copy link
Member

Close as we have cleaned up all the compile warnings and force future commits to fix warnings before merging in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers maintenance improves code quality, but not the product
Projects
None yet
Development

No branches or pull requests

2 participants