From 41021960ef48cabccba7e5c701276dd69fce3e38 Mon Sep 17 00:00:00 2001 From: "David M. Lloyd" Date: Wed, 10 Jan 2024 13:58:53 -0600 Subject: [PATCH] Fix casting issue In IntelliJ, the existing combination of raw types, casting, and lambdas often produces spurious compilation errors. This PR introduces a solution which hides the unsafe cast in a single method, and also uses `Map.putIfAbsent` to avoid constructing a lambda for this case. --- .../io/smallrye/config/SingleConfigSourceInterceptor.java | 4 ++++ .../src/main/java/io/smallrye/config/util/Iterators.java | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 implementation/src/main/java/io/smallrye/config/SingleConfigSourceInterceptor.java create mode 100644 implementation/src/main/java/io/smallrye/config/util/Iterators.java diff --git a/implementation/src/main/java/io/smallrye/config/SingleConfigSourceInterceptor.java b/implementation/src/main/java/io/smallrye/config/SingleConfigSourceInterceptor.java new file mode 100644 index 000000000..9a168c560 --- /dev/null +++ b/implementation/src/main/java/io/smallrye/config/SingleConfigSourceInterceptor.java @@ -0,0 +1,4 @@ +package io.smallrye.config;/** + * + */public final class SingleConfigSourceInterceptor { +} diff --git a/implementation/src/main/java/io/smallrye/config/util/Iterators.java b/implementation/src/main/java/io/smallrye/config/util/Iterators.java new file mode 100644 index 000000000..6fff79dee --- /dev/null +++ b/implementation/src/main/java/io/smallrye/config/util/Iterators.java @@ -0,0 +1,4 @@ +package io.smallrye.config.util;/** + * + */public final class Iterators { +}