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 e3ff34d679 SonarQube bug fixes
e3ff34d679 is described below
commit e3ff34d6798a9278122a1e2e7bdb76c4f6599c4e
Author: James Bognar <[email protected]>
AuthorDate: Wed Feb 18 15:05:53 2026 -0500
SonarQube bug fixes
---
.../src/main/java/org/apache/juneau/commons/function/Snippet.java | 1 +
.../java/org/apache/juneau/commons/function/ThrowingConsumer.java | 1 +
.../org/apache/juneau/commons/function/ThrowingConsumer2.java | 1 +
.../org/apache/juneau/commons/function/ThrowingConsumer3.java | 1 +
.../org/apache/juneau/commons/function/ThrowingConsumer4.java | 1 +
.../org/apache/juneau/commons/function/ThrowingConsumer5.java | 1 +
.../java/org/apache/juneau/commons/function/ThrowingFunction.java | 1 +
.../org/apache/juneau/commons/function/ThrowingFunction2.java | 1 +
.../org/apache/juneau/commons/function/ThrowingFunction3.java | 1 +
.../org/apache/juneau/commons/function/ThrowingFunction4.java | 1 +
.../org/apache/juneau/commons/function/ThrowingFunction5.java | 1 +
.../java/org/apache/juneau/commons/function/ThrowingSupplier.java | 1 +
.../main/java/org/apache/juneau/commons/utils/AssertionUtils.java | 4 ++--
.../main/java/org/apache/juneau/commons/utils/StringUtils.java | 8 ++++----
.../main/java/org/apache/juneau/commons/utils/ThrowableUtils.java | 1 +
.../src/main/java/org/apache/juneau/config/store/FileStore.java | 1 +
.../src/main/java/org/apache/juneau/BeanPropertyMeta.java | 3 ++-
.../main/java/org/apache/juneau/html/BasicHtmlDocTemplate.java | 2 +-
.../java/org/apache/juneau/html/HtmlDocSerializerSession.java | 1 +
.../src/main/java/org/apache/juneau/html/HtmlDocTemplate.java | 1 +
.../main/java/org/apache/juneau/json/JsonSerializerSession.java | 1 +
.../src/main/java/org/apache/juneau/parser/ParserSession.java | 2 ++
.../juneau-marshall/src/main/java/org/apache/juneau/svl/Var.java | 2 ++
.../src/main/java/org/apache/juneau/swap/ObjectSwap.java | 3 +++
.../main/java/org/apache/juneau/microservice/Microservice.java | 6 ++++++
.../org/apache/juneau/microservice/console/ConsoleCommand.java | 1 +
.../org/apache/juneau/microservice/resources/ConfigResource.java | 3 +++
.../apache/juneau/microservice/resources/DirectoryResource.java | 1 +
.../org/apache/juneau/microservice/resources/LogsResource.java | 1 +
.../org/apache/juneau/microservice/jetty/JettyMicroservice.java | 1 +
.../org/apache/juneau/microservice/jetty/JettyServerFactory.java | 1 +
.../apache/juneau/microservice/jetty/resources/DebugResource.java | 1 +
.../java/org/apache/juneau/rest/client/RestCallInterceptor.java | 1 +
.../src/main/java/org/apache/juneau/rest/client/RestClient.java | 4 +++-
.../src/main/java/org/apache/juneau/rest/RestChildren.java | 2 +-
.../src/main/java/org/apache/juneau/rest/RestContext.java | 4 +++-
.../src/main/java/org/apache/juneau/rest/RestOpContext.java | 3 +++
.../src/main/java/org/apache/juneau/rest/RestOperations.java | 2 +-
.../src/main/java/org/apache/juneau/rest/RestRequest.java | 1 +
.../src/main/java/org/apache/juneau/rest/RestResponse.java | 3 ++-
.../src/main/java/org/apache/juneau/rest/arg/RestOpArg.java | 1 +
.../java/org/apache/juneau/rest/httppart/RequestFormParams.java | 2 +-
.../src/main/java/org/apache/juneau/rest/remote/RrpcServlet.java | 1 +
.../apache/juneau/rest/swagger/BasicSwaggerProviderSession.java | 6 ++++--
.../main/java/org/apache/juneau/rest/swagger/SwaggerProvider.java | 1 +
.../java/org/apache/juneau/server/config/repository/Command.java | 2 +-
.../org/apache/juneau/rest/client/RestClient_Logging_Test.java | 4 ++--
47 files changed, 74 insertions(+), 19 deletions(-)
diff --git
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/Snippet.java
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/Snippet.java
index 6af3ceb4a1..b0ea83cfc2 100644
---
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/Snippet.java
+++
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/Snippet.java
@@ -76,6 +76,7 @@ package org.apache.juneau.commons.function;
* <li class='link'><a class="doclink"
href="https://juneau.apache.org/docs/topics/JuneauEcosystemOverview">Juneau
Ecosystem Overview</a>
* </ul>
*/
+@SuppressWarnings("java:S112") // throws Exception intentional - callback may
throw any checked exception
public interface Snippet {
/**
diff --git
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingConsumer.java
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingConsumer.java
index d4a6f8fb3d..14bb9f7721 100644
---
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingConsumer.java
+++
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingConsumer.java
@@ -80,6 +80,7 @@ import java.util.function.*;
* @param <T> The type of the input to the operation.
*/
@FunctionalInterface
+@SuppressWarnings("java:S112") // throws Exception intentional - consumer may
throw any checked exception
public interface ThrowingConsumer<T> extends Consumer<T> {
/**
diff --git
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingConsumer2.java
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingConsumer2.java
index 7591dd72f1..1ddb0af556 100644
---
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingConsumer2.java
+++
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingConsumer2.java
@@ -83,6 +83,7 @@ import static
org.apache.juneau.commons.utils.ThrowableUtils.*;
*/
@FunctionalInterface
@SuppressWarnings({
+ "java:S112", // throws Exception intentional - consumer may throw any
checked exception
"java:S115" // Constants use UPPER_snakeCase convention
})
public interface ThrowingConsumer2<A,B> extends Consumer2<A,B> {
diff --git
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingConsumer3.java
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingConsumer3.java
index 1f56e2b041..330ae098e1 100644
---
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingConsumer3.java
+++
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingConsumer3.java
@@ -88,6 +88,7 @@ import static
org.apache.juneau.commons.utils.ThrowableUtils.*;
*/
@FunctionalInterface
@SuppressWarnings({
+ "java:S112", // throws Exception intentional - consumer may throw any
checked exception
"java:S115" // Constants use UPPER_snakeCase convention
})
public interface ThrowingConsumer3<A,B,C> extends Consumer3<A,B,C> {
diff --git
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingConsumer4.java
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingConsumer4.java
index 4a0dbf4120..23f7a2f073 100644
---
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingConsumer4.java
+++
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingConsumer4.java
@@ -89,6 +89,7 @@ import static
org.apache.juneau.commons.utils.ThrowableUtils.*;
*/
@FunctionalInterface
@SuppressWarnings({
+ "java:S112", // throws Exception intentional - consumer may throw any
checked exception
"java:S115" // Constants use UPPER_snakeCase convention
})
public interface ThrowingConsumer4<A,B,C,D> extends Consumer4<A,B,C,D> {
diff --git
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingConsumer5.java
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingConsumer5.java
index 16d3bc8ca0..edcd367e7a 100644
---
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingConsumer5.java
+++
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingConsumer5.java
@@ -90,6 +90,7 @@ import static
org.apache.juneau.commons.utils.ThrowableUtils.*;
*/
@FunctionalInterface
@SuppressWarnings({
+ "java:S112", // throws Exception intentional - consumer may throw any
checked exception
"java:S115" // Constants use UPPER_snakeCase convention
})
public interface ThrowingConsumer5<A,B,C,D,E> extends Consumer5<A,B,C,D,E> {
diff --git
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingFunction.java
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingFunction.java
index ac55f0f746..39ffb13168 100644
---
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingFunction.java
+++
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingFunction.java
@@ -84,6 +84,7 @@ import java.util.function.*;
* @param <R> The type of the result of the function.
*/
@FunctionalInterface
+@SuppressWarnings("java:S112") // throws Exception intentional - function may
throw any checked exception
public interface ThrowingFunction<T,R> extends Function<T,R> {
/**
diff --git
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingFunction2.java
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingFunction2.java
index 95e3c542cc..1759598060 100644
---
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingFunction2.java
+++
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingFunction2.java
@@ -90,6 +90,7 @@ import java.util.function.*;
*/
@FunctionalInterface
@SuppressWarnings({
+ "java:S112", // throws Exception intentional - function may throw any
checked exception
"java:S115" // Constants use UPPER_snakeCase convention
})
public interface ThrowingFunction2<A,B,R> extends Function2<A,B,R> {
diff --git
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingFunction3.java
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingFunction3.java
index e807592225..ff213f1fb1 100644
---
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingFunction3.java
+++
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingFunction3.java
@@ -91,6 +91,7 @@ import java.util.function.*;
*/
@FunctionalInterface
@SuppressWarnings({
+ "java:S112", // throws Exception intentional - function may throw any
checked exception
"java:S115" // Constants use UPPER_snakeCase convention
})
public interface ThrowingFunction3<A,B,C,R> extends Function3<A,B,C,R> {
diff --git
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingFunction4.java
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingFunction4.java
index 863181bc70..a54448cd99 100644
---
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingFunction4.java
+++
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingFunction4.java
@@ -92,6 +92,7 @@ import java.util.function.*;
*/
@FunctionalInterface
@SuppressWarnings({
+ "java:S112", // throws Exception intentional - function may throw any
checked exception
"java:S115" // Constants use UPPER_snakeCase convention
})
public interface ThrowingFunction4<A,B,C,D,R> extends Function4<A,B,C,D,R> {
diff --git
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingFunction5.java
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingFunction5.java
index f0a7eb1ec5..68058c1cb5 100644
---
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingFunction5.java
+++
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingFunction5.java
@@ -93,6 +93,7 @@ import java.util.function.*;
*/
@FunctionalInterface
@SuppressWarnings({
+ "java:S112", // throws Exception intentional - function may throw any
checked exception
"java:S115" // Constants use UPPER_snakeCase convention
})
public interface ThrowingFunction5<A,B,C,D,E,R> extends Function5<A,B,C,D,E,R>
{
diff --git
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingSupplier.java
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingSupplier.java
index 642112b9b8..cb2404596d 100644
---
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingSupplier.java
+++
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ThrowingSupplier.java
@@ -75,6 +75,7 @@ package org.apache.juneau.commons.function;
* @param <T> The type of results supplied by this supplier.
*/
@FunctionalInterface
+@SuppressWarnings("java:S112") // throws Exception intentional - supplier may
throw any checked exception
public interface ThrowingSupplier<T> {
/**
diff --git
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/utils/AssertionUtils.java
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/utils/AssertionUtils.java
index d7686932c9..ab3c6cf0f2 100644
---
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/utils/AssertionUtils.java
+++
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/utils/AssertionUtils.java
@@ -309,8 +309,8 @@ public class AssertionUtils {
* @return The object cast to the specified type.
* @throws RuntimeException Thrown if the object is not an instance of
the specified type (the exception is provided by the supplier).
*/
- @SuppressWarnings({ "unchecked" })
- public static final <T> T assertType(Class<T> type, Object o,
java.util.function.Supplier<? extends RuntimeException> exceptionSupplier)
throws RuntimeException {
+ @SuppressWarnings({ "unchecked", "java:S112" }) // Exception type comes
from caller's supplier
+ public static final <T> T assertType(Class<T> type, Object o,
java.util.function.Supplier<? extends RuntimeException> exceptionSupplier) {
assertArgNotNull(ARG_type, type);
assertArgNotNull(ARG_o, o);
if (! type.isInstance(o))
diff --git
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/utils/StringUtils.java
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/utils/StringUtils.java
index 81d89a26f1..cbfdca6242 100644
---
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/utils/StringUtils.java
+++
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/utils/StringUtils.java
@@ -690,10 +690,10 @@ public class StringUtils {
*
* @param contents The UTF-8 string to compress.
* @return The GZIP-compressed byte array.
- * @throws Exception If compression fails.
+ * @throws java.io.IOException If compression fails.
* @see #decompress(byte[])
*/
- public static byte[] compress(String contents) throws Exception {
+ public static byte[] compress(String contents) throws
java.io.IOException {
var baos = new ByteArrayOutputStream(contents.length() >> 1);
try (var gos = new GZIPOutputStream(baos)) {
gos.write(contents.getBytes());
@@ -1101,10 +1101,10 @@ public class StringUtils {
*
* @param is The GZIP-compressed byte array to decompress.
* @return The decompressed UTF-8 string.
- * @throws Exception If decompression fails or the input is not valid
GZIP data.
+ * @throws java.io.IOException If decompression fails or the input is
not valid GZIP data.
* @see #compress(String)
*/
- public static String decompress(byte[] is) throws Exception {
+ public static String decompress(byte[] is) throws java.io.IOException {
return read(new GZIPInputStream(new ByteArrayInputStream(is)));
}
diff --git
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/utils/ThrowableUtils.java
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/utils/ThrowableUtils.java
index c86cdd5af8..5b79024151 100644
---
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/utils/ThrowableUtils.java
+++
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/utils/ThrowableUtils.java
@@ -40,6 +40,7 @@ public class ThrowableUtils {
* @param <T> The supplier type.
*/
@FunctionalInterface
+ @SuppressWarnings("java:S112") // throws Throwable intentional -
supplier may throw any exception
public interface SupplierWithThrowable<T> {
/**
diff --git
a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/FileStore.java
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/FileStore.java
index fdace6046d..98a913f0a3 100644
---
a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/FileStore.java
+++
b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/store/FileStore.java
@@ -348,6 +348,7 @@ public class FileStore extends ConfigStore {
}
}
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
class WatcherThread extends Thread {
private final WatchService watchService;
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanPropertyMeta.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanPropertyMeta.java
index 6f37b88605..5dcf5af994 100644
---
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanPropertyMeta.java
+++
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanPropertyMeta.java
@@ -168,6 +168,7 @@ public class BeanPropertyMeta implements
Comparable<BeanPropertyMeta> {
return null;
}
+ @SuppressWarnings("java:S112") // throws Exception intentional
- callback/lifecycle method
private static ObjectSwap swapSwap(AnnotationInfo<Swap> ai)
throws RuntimeException {
var s = ai.inner();
var c = s.value();
@@ -290,7 +291,7 @@ public class BeanPropertyMeta implements
Comparable<BeanPropertyMeta> {
* @return <jk>true</jk> if this property is valid,
<jk>false</jk> otherwise.
* @throws Exception If validation fails.
*/
- @SuppressWarnings("java:S3776")
+ @SuppressWarnings({ "java:S3776", "java:S112" }) // throws
Exception intentional - callback/lifecycle method
public boolean validate(BeanContext bc, BeanRegistry
parentBeanRegistry, TypeVariables typeVarImpls, Set<String> bpro, Set<String>
bpwo) throws Exception {
var bdClasses = list();
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/BasicHtmlDocTemplate.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/BasicHtmlDocTemplate.java
index 7a8f8f1287..f1f1916f42 100644
---
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/BasicHtmlDocTemplate.java
+++
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/BasicHtmlDocTemplate.java
@@ -36,7 +36,7 @@ import org.apache.juneau.commons.utils.*;
* <li class='link'><a class="doclink"
href="https://juneau.apache.org/docs/topics/HtmlBasics">HTML Basics</a>
* </ul>
*/
-@SuppressWarnings({"resource", "java:S1192"})
+@SuppressWarnings({"resource", "java:S112", "java:S1192"}) // S112: template
methods throw Exception for subclass flexibility
public class BasicHtmlDocTemplate implements HtmlDocTemplate {
private static boolean exists(String s) {
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlDocSerializerSession.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlDocSerializerSession.java
index c4855f4482..884d7689a0 100644
---
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlDocSerializerSession.java
+++
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlDocSerializerSession.java
@@ -225,6 +225,7 @@ public class HtmlDocSerializerSession extends
HtmlStrippedDocSerializerSession {
* @param o The object being serialized.
* @throws Exception Error occurred during serialization.
*/
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
public void parentSerialize(Object out, Object o) throws Exception {
try (var pipe = createPipe(out)) {
super.doSerialize(pipe, o);
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlDocTemplate.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlDocTemplate.java
index 5e8483020d..f3e766eef4 100644
---
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlDocTemplate.java
+++
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlDocTemplate.java
@@ -61,6 +61,7 @@ package org.apache.juneau.html;
* <li class='link'><a class="doclink"
href="https://juneau.apache.org/docs/topics/HtmlBasics">HTML Basics</a>
* </ul>
*/
+@SuppressWarnings("java:S112") // throws Exception intentional - template
methods may throw any checked exception
public interface HtmlDocTemplate {
/**
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/JsonSerializerSession.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/JsonSerializerSession.java
index e212da789a..9e095c07fd 100644
---
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/JsonSerializerSession.java
+++
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/JsonSerializerSession.java
@@ -447,6 +447,7 @@ public class JsonSerializerSession extends
WriterSerializerSession {
* @return The serialized object.
* @throws Exception Error occurred.
*/
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
protected String serializeJson(Object o) throws Exception {
var sw = new StringWriter();
serializeAnything(getJsonWriter(createPipe(sw)).i(getInitialDepth()), o,
getExpectedRootType(o), "root", null);
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ParserSession.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ParserSession.java
index 5714303e88..52927a22ec 100644
---
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ParserSession.java
+++
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ParserSession.java
@@ -894,6 +894,7 @@ public class ParserSession extends BeanSession {
* @return The same collection that was passed in to allow this method
to be chained.
* @throws Exception If thrown from underlying stream, or if the input
contains a syntax error or is malformed.
*/
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
protected <E> Collection<E> doParseIntoCollection(ParserPipe pipe,
Collection<E> c, Type elementType) throws Exception {
throw unsupportedOp("Parser ''{0}'' does not support this
method.", cn(getClass()));
}
@@ -913,6 +914,7 @@ public class ParserSession extends BeanSession {
* @return The same map that was passed in to allow this method to be
chained.
* @throws Exception If thrown from underlying stream, or if the input
contains a syntax error or is malformed.
*/
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
protected <K,V> Map<K,V> doParseIntoMap(ParserPipe pipe, Map<K,V> m,
Type keyType, Type valueType) throws Exception {
throw unsupportedOp("Parser ''{0}'' does not support this
method.", cn(getClass()));
}
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/svl/Var.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/svl/Var.java
index 7d7dcdc4ba..16ad1c2db2 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/svl/Var.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/svl/Var.java
@@ -91,6 +91,7 @@ public abstract class Var {
* @return The resolved value.
* @throws Exception Any exception can be thrown.
*/
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
public abstract String resolve(VarResolverSession session, String arg)
throws Exception;
/**
@@ -101,6 +102,7 @@ public abstract class Var {
* @param arg The inside argument of the variable.
* @throws Exception Any exception can be thrown.
*/
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
public abstract void resolveTo(VarResolverSession session, Writer w,
String arg) throws Exception;
/**
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/ObjectSwap.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/ObjectSwap.java
index df7394fa4a..3f38a3b2e4 100644
---
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/ObjectSwap.java
+++
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/ObjectSwap.java
@@ -327,6 +327,7 @@ public abstract class ObjectSwap<T,S> {
* @return The transformed object.
* @throws Exception If a problem occurred trying to convert the output.
*/
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
public S swap(BeanSession session, T o, String template) throws
Exception {
throw new SerializeException("Swap method not implemented on
ObjectSwap ''{0}''", cn(this));
}
@@ -351,6 +352,7 @@ public abstract class ObjectSwap<T,S> {
* @return The narrowed object.
* @throws Exception If this method is not implemented.
*/
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
public T unswap(BeanSession session, S f, ClassMeta<?> hint) throws
Exception {
return unswap(session, f, hint, template);
}
@@ -372,6 +374,7 @@ public abstract class ObjectSwap<T,S> {
* @return The transformed object.
* @throws Exception If a problem occurred trying to convert the output.
*/
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
public T unswap(BeanSession session, S f, ClassMeta<?> hint, String
template) throws Exception {
throw new ParseException("Unswap method not implemented on
ObjectSwap ''{0}''", cn(this));
}
diff --git
a/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/Microservice.java
b/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/Microservice.java
index a09316c7e0..26eb2ce7f0 100755
---
a/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/Microservice.java
+++
b/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/Microservice.java
@@ -178,6 +178,7 @@ public class Microservice implements ConfigEventListener {
* @return A new microservice.
* @throws Exception Error occurred.
*/
+ @SuppressWarnings("java:S112") // throws Exception intentional
- callback/lifecycle method
public Microservice build() throws Exception {
return new Microservice(this);
}
@@ -1013,6 +1014,7 @@ public class Microservice implements ConfigEventListener {
* @return This object.
* @throws Exception Error occurred
*/
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
public Microservice join() throws Exception {
return this;
}
@@ -1059,6 +1061,7 @@ public class Microservice implements ConfigEventListener {
* @return This object.
* @throws Exception Error occurred.
*/
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
public synchronized Microservice start() throws Exception {
if (config.getName() == null)
@@ -1089,6 +1092,7 @@ public class Microservice implements ConfigEventListener {
* @return This object.
* @throws Exception Error occurred
*/
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
public synchronized Microservice startConsole() throws Exception {
if (nn(consoleThread) && ! consoleThread.isAlive())
consoleThread.start();
@@ -1104,6 +1108,7 @@ public class Microservice implements ConfigEventListener {
* @return This object.
* @throws Exception Error occurred
*/
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
public Microservice stop() throws Exception {
listener.onStop(this);
return this;
@@ -1115,6 +1120,7 @@ public class Microservice implements ConfigEventListener {
* @return This object.
* @throws Exception Error occurred
*/
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
public synchronized Microservice stopConsole() throws Exception {
if (nn(consoleThread) && consoleThread.isAlive())
consoleThread.interrupt();
diff --git
a/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/console/ConsoleCommand.java
b/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/console/ConsoleCommand.java
index ad6acd21cf..2542e1f551 100644
---
a/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/console/ConsoleCommand.java
+++
b/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/console/ConsoleCommand.java
@@ -114,6 +114,7 @@ public abstract class ConsoleCommand {
* @throws Exception
* Any thrown exception will simply be sent to STDERR.
*/
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
public abstract boolean execute(Scanner in, PrintWriter out, Args args)
throws Exception;
/**
diff --git
a/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/resources/ConfigResource.java
b/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/resources/ConfigResource.java
index 0118cb1ae9..845ca4cce6 100755
---
a/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/resources/ConfigResource.java
+++
b/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/resources/ConfigResource.java
@@ -147,6 +147,7 @@ public class ConfigResource extends BasicRestServlet {
}
)
)
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
public JsonMap setConfigContents(
@Content @Schema(d="New contents in INI file format.")
Reader contents
) throws Exception {
@@ -164,6 +165,7 @@ public class ConfigResource extends BasicRestServlet {
}
)
)
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
public JsonMap setConfigContentsFormPost(
@FormData("contents") @Schema(d="New contents in INI
file format.") String contents
) throws Exception {
@@ -181,6 +183,7 @@ public class ConfigResource extends BasicRestServlet {
}
)
)
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
public JsonMap setConfigSection(
@Path("section") @Schema(d="Section name in config
file.") String section,
@Content @Schema(d="New contents of config section as a
simple map of key/value pairs.")
diff --git
a/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/resources/DirectoryResource.java
b/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/resources/DirectoryResource.java
index b7d2e5cc3d..8cdbd84838 100755
---
a/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/resources/DirectoryResource.java
+++
b/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/resources/DirectoryResource.java
@@ -258,6 +258,7 @@ public class DirectoryResource extends BasicRestServlet {
@HtmlDocConfig(
nav={"<h5>Folder: $RA{fullPath}</h5>"}
)
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
public FileResource getFile(RestRequest req, @Path("/*") String path)
throws NotFound, Exception {
var dir = getFile(path);
diff --git
a/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/resources/LogsResource.java
b/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/resources/LogsResource.java
index deffae68dc..7d7f1205bb 100644
---
a/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/resources/LogsResource.java
+++
b/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/resources/LogsResource.java
@@ -194,6 +194,7 @@ public class LogsResource extends BasicRestServlet {
@HtmlDocConfig(
nav={"<h5>Folder: $RA{fullPath}</h5>"}
)
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
public FileResource getFile(RestRequest req, @Path("/*") String path)
throws NotFound, Exception {
var dir = getFile(path);
diff --git
a/juneau-microservice/juneau-microservice-jetty/src/main/java/org/apache/juneau/microservice/jetty/JettyMicroservice.java
b/juneau-microservice/juneau-microservice-jetty/src/main/java/org/apache/juneau/microservice/jetty/JettyMicroservice.java
index 228edef61e..7b895255f0 100644
---
a/juneau-microservice/juneau-microservice-jetty/src/main/java/org/apache/juneau/microservice/jetty/JettyMicroservice.java
+++
b/juneau-microservice/juneau-microservice-jetty/src/main/java/org/apache/juneau/microservice/jetty/JettyMicroservice.java
@@ -625,6 +625,7 @@ public class JettyMicroservice extends Microservice {
*
* @throws Exception Error occurred.
*/
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
public void destroyServer() throws Exception {
var s = server.getAndSet(null);
if (nn(s))
diff --git
a/juneau-microservice/juneau-microservice-jetty/src/main/java/org/apache/juneau/microservice/jetty/JettyServerFactory.java
b/juneau-microservice/juneau-microservice-jetty/src/main/java/org/apache/juneau/microservice/jetty/JettyServerFactory.java
index 4098ad3abd..ffd63d8dc1 100644
---
a/juneau-microservice/juneau-microservice-jetty/src/main/java/org/apache/juneau/microservice/jetty/JettyServerFactory.java
+++
b/juneau-microservice/juneau-microservice-jetty/src/main/java/org/apache/juneau/microservice/jetty/JettyServerFactory.java
@@ -34,5 +34,6 @@ public interface JettyServerFactory {
* @return A newly-created but not-yet-started server.
* @throws Exception Any exception.
*/
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
Server create(String jettyXml) throws Exception;
}
\ No newline at end of file
diff --git
a/juneau-microservice/juneau-microservice-jetty/src/main/java/org/apache/juneau/microservice/jetty/resources/DebugResource.java
b/juneau-microservice/juneau-microservice-jetty/src/main/java/org/apache/juneau/microservice/jetty/resources/DebugResource.java
index 5747e5a6d6..58db4ff9c0 100644
---
a/juneau-microservice/juneau-microservice-jetty/src/main/java/org/apache/juneau/microservice/jetty/resources/DebugResource.java
+++
b/juneau-microservice/juneau-microservice-jetty/src/main/java/org/apache/juneau/microservice/jetty/resources/DebugResource.java
@@ -64,6 +64,7 @@ public class DebugResource extends BasicRestServlet {
* @return The thread dump contents.
*/
@RestPost(path = "/jetty/dump", description = "Generates and saves the
jetty thread dump file to jetty-thread-dump.log.")
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
public Ok createJettyDump(RestRequest req, RestResponse res) throws
Exception {
var dump = JettyMicroservice.getInstance().getServer().dump();
try (var fw = new
FileWriter(req.getConfig().get("Logging/logDir").orElse("") +
"/jetty-thread-dump.log")) {
diff --git
a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestCallInterceptor.java
b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestCallInterceptor.java
index 589dc75996..6066a7d302 100644
---
a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestCallInterceptor.java
+++
b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestCallInterceptor.java
@@ -49,6 +49,7 @@ package org.apache.juneau.rest.client;
* <li class='link'><a class="doclink"
href="https://juneau.apache.org/docs/topics/JuneauRestClientBasics">juneau-rest-client
Basics</a>
* </ul>
*/
+@SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
public interface RestCallInterceptor {
/**
diff --git
a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
index ebd2238d36..cc80a7aea2 100644
---
a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
+++
b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
@@ -2952,6 +2952,7 @@ public class RestClient extends BeanContextable
implements HttpClient, Closeable
* @return This object.
* @throws Exception If one or more interceptors could not be
created.
*/
+ @SuppressWarnings("java:S112") // throws Exception intentional
- callback/lifecycle method
public Builder interceptors(Class<?>...values) throws Exception
{
for (var c : values) {
if (c == null)
@@ -8073,7 +8074,8 @@ public class RestClient extends BeanContextable
implements HttpClient, Closeable
}
@SuppressWarnings({
- "java:S3776" // Cognitive complexity acceptable for remote
execution logic
+ "java:S3776", // Cognitive complexity acceptable for remote
execution logic
+ "java:S112" // throws Exception intentional -
callback/lifecycle method
})
Object executeRemote(Class<?> interfaceClass, RestRequest rc, Method
method, RemoteOperationMeta rom) throws Exception {
RemoteOperationReturn ror = rom.getReturns();
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestChildren.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestChildren.java
index ed7a1bddfe..674cb68ba9 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestChildren.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestChildren.java
@@ -86,7 +86,7 @@ public class RestChildren {
/**
* Represents a null value for the {@link Rest#restChildrenClass()}
annotation.
*/
- @SuppressWarnings("javadoc")
+ @SuppressWarnings({ "javadoc", "java:S112" }) // throws Exception
intentional - callback/lifecycle method
public final class Void extends RestChildren {
public Void(Builder builder) throws Exception {
super(builder);
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
index 5c38f83736..2fcf27bede 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
@@ -4536,7 +4536,8 @@ public class RestContext extends Context {
* @throws Exception If a problem occurred instantiating one of
the child rest contexts.
*/
@SuppressWarnings({
- "java:S3776" // Cognitive complexity acceptable for
REST children creation
+ "java:S3776", // Cognitive complexity acceptable for
REST children creation
+ "java:S112" // throws Exception intentional -
callback/lifecycle method
})
protected RestChildren.Builder
createRestChildren(BasicBeanStore beanStore, Supplier<?> resource, RestContext
restContext) throws Exception {
@@ -6146,6 +6147,7 @@ public class RestContext extends Context {
}
}
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
protected void handleNotFound(RestSession session) throws Exception {
var pathInfo = session.getPathInfo();
var methodUC = session.getMethod();
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestOpContext.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestOpContext.java
index 50cac948cc..5605d1406c 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestOpContext.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestOpContext.java
@@ -2325,6 +2325,7 @@ public class RestOpContext extends Context implements
Comparable<RestOpContext>
* @return The wrapped request object.
* @throws Exception If any errors occur trying to interpret the
request.
*/
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
public RestRequest createRequest(RestSession session) throws Exception {
return new RestRequest(this, session);
}
@@ -2338,6 +2339,7 @@ public class RestOpContext extends Context implements
Comparable<RestOpContext>
* @return The wrapped response object.
* @throws Exception If any errors occur trying to interpret the
request or response.
*/
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
public RestResponse createResponse(RestSession session, RestRequest
req) throws Exception {
return new RestResponse(this, session, req);
}
@@ -2349,6 +2351,7 @@ public class RestOpContext extends Context implements
Comparable<RestOpContext>
* @return A new REST operation session.
* @throws Exception If op session could not be created.
*/
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
public RestOpSession.Builder createSession(RestSession session) throws
Exception {
return RestOpSession.create(this,
session).logger(callLogger).debug(debug.isDebug(this, session.getRequest()));
}
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestOperations.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestOperations.java
index ba19766789..a8c1c59bbe 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestOperations.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestOperations.java
@@ -101,7 +101,7 @@ public class RestOperations {
* The {@code Void} class is used as a placeholder when the {@link
Rest} annotation
* does not specify a custom {@code RestOperations} class.
*/
- @SuppressWarnings("javadoc")
+ @SuppressWarnings({ "javadoc", "java:S112" }) // throws Exception
intentional - callback/lifecycle method
public final class Void extends RestOperations {
public Void(Builder builder) throws Exception {
super(builder);
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestRequest.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestRequest.java
index 1e7725b425..3ec8a1422c 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestRequest.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestRequest.java
@@ -211,6 +211,7 @@ public class RestRequest extends HttpServletRequestWrapper {
/**
* Constructor.
*/
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
RestRequest(RestOpContext opContext, RestSession session) throws
Exception {
super(session.getRequest());
this.session = session;
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestResponse.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestResponse.java
index 947ce99c62..7f132d63cc 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestResponse.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestResponse.java
@@ -134,7 +134,8 @@ public class RestResponse extends
HttpServletResponseWrapper {
* Constructor.
*/
@SuppressWarnings({
- "java:S3776" // Cognitive complexity acceptable for response
initialization
+ "java:S3776", // Cognitive complexity acceptable for response
initialization
+ "java:S112" // throws Exception intentional -
callback/lifecycle method
})
RestResponse(RestOpContext opContext, RestSession session, RestRequest
req) throws Exception {
super(session.getResponse());
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/arg/RestOpArg.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/arg/RestOpArg.java
index ab9fca363d..71b8d0db07 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/arg/RestOpArg.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/arg/RestOpArg.java
@@ -61,5 +61,6 @@ public interface RestOpArg {
* @return The resolved object.
* @throws Exception Generic error occurred.
*/
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
Object resolve(RestOpSession opSession) throws Exception;
}
\ No newline at end of file
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/RequestFormParams.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/RequestFormParams.java
index 95f1d20fc5..67ec6c9cfd 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/RequestFormParams.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/RequestFormParams.java
@@ -136,7 +136,7 @@ public class RequestFormParams extends
ArrayList<RequestFormParam> {
* @param caseSensitive Whether case-sensitive name matching is enabled.
* @throws Exception Any exception can be thrown.
*/
- @SuppressWarnings({ "null", "java:S3776" })
+ @SuppressWarnings({ "null", "java:S3776", "java:S112" }) // throws
Exception intentional - callback/lifecycle method
public RequestFormParams(RestRequest req, boolean caseSensitive) throws
Exception {
this.req = req;
this.caseSensitive = caseSensitive;
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/remote/RrpcServlet.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/remote/RrpcServlet.java
index 151ea28c94..7d320cfe95 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/remote/RrpcServlet.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/remote/RrpcServlet.java
@@ -224,5 +224,6 @@ public abstract class RrpcServlet extends BasicRestServlet {
* @return The service map.
* @throws Exception Any exception.
*/
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
protected abstract Map<Class<?>,Object> getServiceMap() throws
Exception;
}
\ No newline at end of file
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 eac4a557cc..025c31f8a5 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
@@ -215,7 +215,7 @@ public class BasicSwaggerProviderSession {
* @return A new {@link Swagger} object.
* @throws Exception If an error occurred producing the Swagger.
*/
- @SuppressWarnings({ "java:S3776", "java:S6541" })
+ @SuppressWarnings({ "java:S3776", "java:S6541", "java:S112" }) //
throws Exception intentional - callback/lifecycle method
public Swagger getSwagger() throws Exception {
// @formatter:off
@@ -679,7 +679,8 @@ public class BasicSwaggerProviderSession {
}
@SuppressWarnings({
- "java:S3776" // Cognitive complexity acceptable for example
generation logic
+ "java:S3776", // Cognitive complexity acceptable for example
generation logic
+ "java:S112" // throws Exception intentional -
callback/lifecycle method
})
private void addBodyExamples(RestOpContext sm, JsonMap piri, boolean
response, Type type, Locale locale) throws Exception {
@@ -800,6 +801,7 @@ public class BasicSwaggerProviderSession {
return (JsonMap) om.get(httpMethod);
}
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
private JsonMap getSchema(JsonMap schema, Type type, BeanSession bs)
throws Exception {
if (type == Swagger.class)
diff --git
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/swagger/SwaggerProvider.java
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/swagger/SwaggerProvider.java
index d8cd767207..cd1d5c4a52 100644
---
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/swagger/SwaggerProvider.java
+++
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/swagger/SwaggerProvider.java
@@ -215,5 +215,6 @@ public interface SwaggerProvider {
* @return A new {@link Swagger} DTO object.
* @throws Exception If an error occurred producing the Swagger.
*/
+ @SuppressWarnings("java:S112") // throws Exception intentional -
callback/lifecycle method
Swagger getSwagger(RestContext context, Locale locale) throws Exception;
}
\ No newline at end of file
diff --git
a/juneau-sc/juneau-sc-server/src/main/java/org/apache/juneau/server/config/repository/Command.java
b/juneau-sc/juneau-sc-server/src/main/java/org/apache/juneau/server/config/repository/Command.java
index 67b6b94441..2adf04d5c5 100644
---
a/juneau-sc/juneau-sc-server/src/main/java/org/apache/juneau/server/config/repository/Command.java
+++
b/juneau-sc/juneau-sc-server/src/main/java/org/apache/juneau/server/config/repository/Command.java
@@ -16,7 +16,7 @@
*/
package org.apache.juneau.server.config.repository;
-@SuppressWarnings("javadoc")
+@SuppressWarnings({ "javadoc", "java:S112" }) // throws Exception intentional
- callback/lifecycle method
public interface Command {
void execute() throws Exception;
}
\ No newline at end of file
diff --git
a/juneau-utest/src/test/java/org/apache/juneau/rest/client/RestClient_Logging_Test.java
b/juneau-utest/src/test/java/org/apache/juneau/rest/client/RestClient_Logging_Test.java
index fe677b23db..b72a1f9825 100644
---
a/juneau-utest/src/test/java/org/apache/juneau/rest/client/RestClient_Logging_Test.java
+++
b/juneau-utest/src/test/java/org/apache/juneau/rest/client/RestClient_Logging_Test.java
@@ -220,11 +220,11 @@ class RestClient_Logging_Test extends TestBase {
// Helper methods.
//------------------------------------------------------------------------------------------------------------------
- private static RestClient.Builder client() {
+ private static MockRestClient.Builder client() {
return MockRestClient.create(A.class).json5();
}
- private static RestClient.Builder clientPlain() {
+ private static MockRestClient.Builder clientPlain() {
return MockRestClient.create(A.class);
}
}
\ No newline at end of file