This is an automated email from the ASF dual-hosted git repository. yangjie01 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push: new 10dd350acbb1 [MINOR][CORE] Fix compilation warnings in `UnsafeInMemorySorter.java` 10dd350acbb1 is described below commit 10dd350acbb13c78a0ccc96b8e3fea3168c2a228 Author: yangjie01 <yangji...@baidu.com> AuthorDate: Fri Jan 17 16:35:25 2025 +0800 [MINOR][CORE] Fix compilation warnings in `UnsafeInMemorySorter.java` ### What changes were proposed in this pull request? This pr aims to fix compilation warnings in `UnsafeInMemorySorter.java` as follows: ``` [warn] /home/runner/work/spark/spark/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeInMemorySorter.java:219:1: [unchecked] unchecked method invocation: constructor <init> in class SparkOutOfMemoryError is applied to given types [warn] throw new SparkOutOfMemoryError("_LEGACY_ERROR_TEMP_3301", new HashMap()); [warn] ^ required: String,Map<String,String> [warn] found: String,HashMap [warn] /home/runner/work/spark/spark/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeInMemorySorter.java:219:1: [unchecked] unchecked conversion [warn] throw new SparkOutOfMemoryError("_LEGACY_ERROR_TEMP_3301", new HashMap()); [warn] ^ required: Map<String,String> [warn] found: HashMap ``` ### Why are the changes needed? Fix compilation warnings in `UnsafeInMemorySorter.java` ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Pass GitHub Actions ### Was this patch authored or co-authored using generative AI tooling? No Closes #49546 from LuciferYang/minor-UnsafeInMemorySorter. Authored-by: yangjie01 <yangji...@baidu.com> Signed-off-by: yangjie01 <yangji...@baidu.com> --- .../apache/spark/util/collection/unsafe/sort/UnsafeInMemorySorter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeInMemorySorter.java b/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeInMemorySorter.java index 761ced66f78c..ff00f8c1c751 100644 --- a/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeInMemorySorter.java +++ b/core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeInMemorySorter.java @@ -216,7 +216,7 @@ public final class UnsafeInMemorySorter { if (array != null) { if (newArray.size() < array.size()) { // checkstyle.off: RegexpSinglelineJava - throw new SparkOutOfMemoryError("_LEGACY_ERROR_TEMP_3301", new HashMap()); + throw new SparkOutOfMemoryError("_LEGACY_ERROR_TEMP_3301", new HashMap<>()); // checkstyle.on: RegexpSinglelineJava } Platform.copyMemory( --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org