This is an automated email from the ASF dual-hosted git repository.

jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git


The following commit(s) were added to refs/heads/master by this push:
     new d68451ccac SonarQube bug fixes
d68451ccac is described below

commit d68451ccac53eccf8394c6610d7ca63882bed90f
Author: James Bognar <[email protected]>
AuthorDate: Wed Feb 18 13:39:39 2026 -0500

    SonarQube bug fixes
---
 .../src/main/java/org/apache/juneau/commons/collections/Cache.java  | 1 +
 .../src/main/java/org/apache/juneau/commons/collections/Cache2.java | 1 +
 .../src/main/java/org/apache/juneau/commons/collections/Cache3.java | 1 +
 .../src/main/java/org/apache/juneau/commons/collections/Cache4.java | 1 +
 .../src/main/java/org/apache/juneau/commons/collections/Cache5.java | 1 +
 .../main/java/org/apache/juneau/commons/utils/CollectionUtils.java  | 5 ++++-
 .../src/main/java/org/apache/juneau/csv/CsvParserSession.java       | 1 +
 .../org/apache/juneau/rest/swagger/BasicSwaggerProviderSession.java | 6 +++---
 8 files changed, 13 insertions(+), 4 deletions(-)

diff --git 
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/collections/Cache.java
 
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/collections/Cache.java
index f7dd900611..d8930d398b 100644
--- 
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/collections/Cache.java
+++ 
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/collections/Cache.java
@@ -447,6 +447,7 @@ public class Cache<K,V> {
         * @param type The value type class.
         * @return A new builder for configuring the cache.
         */
+       @SuppressWarnings("java:S1172") // Parameters required for type 
inference in public API
        public static <K,V> Builder<K,V> of(Class<K> key, Class<V> type) {
                return new Builder<>();
        }
diff --git 
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/collections/Cache2.java
 
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/collections/Cache2.java
index 39b017f9ba..0f4bc0f82e 100644
--- 
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/collections/Cache2.java
+++ 
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/collections/Cache2.java
@@ -383,6 +383,7 @@ public class Cache2<K1,K2,V> {
         * @param type The value type class.
         * @return A new builder for configuring the cache.
         */
+       @SuppressWarnings("java:S1172") // Parameters required for type 
inference in public API
        public static <K1,K2,V> Builder<K1,K2,V> of(Class<K1> key1, Class<K2> 
key2, Class<V> type) {
                return new Builder<>();
        }
diff --git 
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/collections/Cache3.java
 
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/collections/Cache3.java
index b829ed87ae..4ba49957bd 100644
--- 
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/collections/Cache3.java
+++ 
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/collections/Cache3.java
@@ -251,6 +251,7 @@ public class Cache3<K1,K2,K3,V> {
         * @param type The value type class.
         * @return A new builder for configuring the cache.
         */
+       @SuppressWarnings("java:S1172") // Parameters required for type 
inference in public API
        public static <K1,K2,K3,V> Builder<K1,K2,K3,V> of(Class<K1> key1, 
Class<K2> key2, Class<K3> key3, Class<V> type) {
                return new Builder<>();
        }
diff --git 
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/collections/Cache4.java
 
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/collections/Cache4.java
index f5ab6ed5bd..51972c1a89 100644
--- 
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/collections/Cache4.java
+++ 
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/collections/Cache4.java
@@ -241,6 +241,7 @@ public class Cache4<K1,K2,K3,K4,V> {
         * @param type The value type class.
         * @return A new builder for configuring the cache.
         */
+       @SuppressWarnings("java:S1172") // Parameters required for type 
inference in public API
        public static <K1,K2,K3,K4,V> Builder<K1,K2,K3,K4,V> of(Class<K1> key1, 
Class<K2> key2, Class<K3> key3, Class<K4> key4, Class<V> type) {
                return new Builder<>();
        }
diff --git 
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/collections/Cache5.java
 
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/collections/Cache5.java
index 54eaaac350..8dc6a57e73 100644
--- 
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/collections/Cache5.java
+++ 
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/collections/Cache5.java
@@ -247,6 +247,7 @@ public class Cache5<K1,K2,K3,K4,K5,V> {
         * @param type The value type class.
         * @return A new builder for configuring the cache.
         */
+       @SuppressWarnings("java:S1172") // Parameters required for type 
inference in public API
        public static <K1,K2,K3,K4,K5,V> Builder<K1,K2,K3,K4,K5,V> of(Class<K1> 
key1, Class<K2> key2, Class<K3> key3, Class<K4> key4, Class<K5> key5, Class<V> 
type) {
                return new Builder<>();
        }
diff --git 
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/utils/CollectionUtils.java
 
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/utils/CollectionUtils.java
index a824bb120c..2d277c6405 100644
--- 
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/utils/CollectionUtils.java
+++ 
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/utils/CollectionUtils.java
@@ -1862,6 +1862,7 @@ public class CollectionUtils {
         * @param valueType The value type class.
         * @return An empty unmodifiable map.
         */
+       @SuppressWarnings("java:S1172") // Parameters required for type 
inference in public API
        public static <K,V> Map<K,V> mape(Class<K> keyType, Class<V> valueType) 
{
                return Collections.emptyMap();
        }
@@ -1892,7 +1893,8 @@ public class CollectionUtils {
         * @return <jk>null</jk>.
         */
        @SuppressWarnings({
-               "java:S1168"     // TODO: Intentional null return for assertion 
testing. Consider Optional.
+               "java:S1168",    // TODO: Intentional null return for assertion 
testing. Consider Optional.
+               "java:S1172"    // Parameters required for type inference in 
public API
        })
        public static <K,V> Map<K,V> mapn(Class<K> keyType, Class<V> valueType) 
{
                return null;
@@ -1907,6 +1909,7 @@ public class CollectionUtils {
         * @param valueType The value type.
         * @return A new modifiable map.
         */
+       @SuppressWarnings("java:S1172") // Parameters required for type 
inference in public API
        public static <K,V> Map<K,V> mapOf(Class<K> keyType, Class<V> 
valueType) {
                return map();
        }
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/csv/CsvParserSession.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/csv/CsvParserSession.java
index e36ecff16b..67f3fc05a1 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/csv/CsvParserSession.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/csv/CsvParserSession.java
@@ -171,6 +171,7 @@ public class CsvParserSession extends ReaderParserSession {
                super(builder);
        }
 
+       @SuppressWarnings("java:S1172") // Future code - parameters reserved 
for implementation
        private static <T> T parseAnything(ClassMeta<T> eType, ParserReader r, 
Object outer, BeanPropertyMeta pMeta) throws ParseException {
                throw new ParseException("Not implemented.");
        }
diff --git 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/swagger/BasicSwaggerProviderSession.java
 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/swagger/BasicSwaggerProviderSession.java
index 0a91e5288b..eac4a557cc 100644
--- 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/swagger/BasicSwaggerProviderSession.java
+++ 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/swagger/BasicSwaggerProviderSession.java
@@ -1194,7 +1194,7 @@ public class BasicSwaggerProviderSession {
                return nullIfEmpty(ol);
        }
 
-       private JsonMap toMap(Contact a, String location, 
Object...locationArgs) {
+       private JsonMap toMap(Contact a, String _location, 
Object..._locationArgs) {
                if (ContactAnnotation.empty(a))
                        return null;
                Predicate<String> ne = Utils::ne;
@@ -1207,7 +1207,7 @@ public class BasicSwaggerProviderSession {
                return nullIfEmpty(om);
        }
 
-       private JsonMap toMap(ExternalDocs a, String location, 
Object...locationArgs) {
+       private JsonMap toMap(ExternalDocs a, String _location, 
Object..._locationArgs) {
                if (ExternalDocsAnnotation.empty(a))
                        return null;
                Predicate<String> ne = Utils::ne;
@@ -1219,7 +1219,7 @@ public class BasicSwaggerProviderSession {
                return nullIfEmpty(om);
        }
 
-       private JsonMap toMap(License a, String location, 
Object...locationArgs) {
+       private JsonMap toMap(License a, String _location, 
Object..._locationArgs) {
                if (LicenseAnnotation.empty(a))
                        return null;
                Predicate<String> ne = Utils::ne;

Reply via email to