[SPARK-49020] Avoid raw type usage#26
Closed
dongjoon-hyun wants to merge 1 commit into
Closed
Conversation
Member
Author
viirya
approved these changes
Jul 26, 2024
Member
Author
|
Thank you, @viirya . |
Closed
jiangzho
pushed a commit
to jiangzho/spark-kubernetes-operator
that referenced
this pull request
Jul 17, 2025
### What changes were proposed in this pull request? This PR aims to avoid `raw` type usage. - https://docs.oracle.com/javase/tutorial/java/generics/rawTypes.html > A raw type is the name of a generic class or interface without any type arguments. ### Why are the changes needed? We need to use use generic types like the following. ```java - Class listenerClass = Class.forName(name); + Class<?> listenerClass = Class.forName(name); ``` ```java - public static Object resolveValueToPrimitiveType(Class clazz, String value) { + public static Object resolveValueToPrimitiveType(Class<?> clazz, String value) { ``` Or, we can use `var` syntax like the following. ```java - SentinelManager sentinelManager = new SentinelManager<SparkApplication>(); + var sentinelManager = new SentinelManager<SparkApplication>(); ``` ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#26 from dongjoon-hyun/SPARK-49020. Authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
jiangzho
added a commit
to jiangzho/spark-kubernetes-operator
that referenced
this pull request
Jul 17, 2025
Sync main branch into apple internal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This PR aims to avoid
rawtype usage.Why are the changes needed?
We need to use use generic types like the following.
Or, we can use
varsyntax like the following.Does this PR introduce any user-facing change?
No.
How was this patch tested?
Pass the CIs.
Was this patch authored or co-authored using generative AI tooling?
No.