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

commit dfc800eea82074301d8a8012d31361043e7d3ed9
Author: James Bognar <[email protected]>
AuthorDate: Thu Jul 23 09:12:56 2026 -0400

    TODO-283: accept oversized classes as cohesive-by-design (add java:S6539)
    
    ARCH-02 triage: add class-level @SuppressWarnings("java:S6539") with a 
one-line
    rationale to 17 oversized-but-cohesive classes (RestClient, RestRequest,
    StringUtils, ClassInfo, CollectionUtils, BeanInstantiator, BeanMeta, Shorts,
    HttpPartSchema, MarshallUtils, MarshallingContext, SerializerSession,
    MarshalledMap, ParquetParserSession, HttpHeaders, JsonSchema, HtmlBuilder) 
so
    future sweeps don't re-flag them. No splits. Annotation-type declarations 
and
    threshold-adjacent files intentionally left unsuppressed.
    
    Co-authored-by: Cursor <[email protected]>
---
 .../src/main/java/org/apache/juneau/bean/html5/HtmlBuilder.java        | 3 +++
 .../src/main/java/org/apache/juneau/bean/jsonschema/JsonSchema.java    | 3 ++-
 .../src/main/java/org/apache/juneau/commons/bean/BeanMeta.java         | 3 ++-
 .../main/java/org/apache/juneau/commons/inject/BeanInstantiator.java   | 3 ++-
 .../src/main/java/org/apache/juneau/commons/reflect/ClassInfo.java     | 3 ++-
 .../src/main/java/org/apache/juneau/commons/utils/CollectionUtils.java | 3 ++-
 .../src/main/java/org/apache/juneau/commons/utils/Shorts.java          | 3 ++-
 .../src/main/java/org/apache/juneau/commons/utils/StringUtils.java     | 3 ++-
 .../src/main/java/org/apache/juneau/marshall/MarshallingContext.java   | 2 +-
 .../java/org/apache/juneau/marshall/collections/MarshalledMap.java     | 3 ++-
 .../main/java/org/apache/juneau/marshall/httppart/HttpPartSchema.java  | 3 ++-
 .../main/java/org/apache/juneau/marshall/marshaller/MarshallUtils.java | 3 +++
 .../java/org/apache/juneau/marshall/parquet/ParquetParserSession.java  | 3 ++-
 .../java/org/apache/juneau/marshall/serializer/SerializerSession.java  | 3 ++-
 .../main/java/org/apache/juneau/rest/client/classic/RestClient.java    | 1 +
 .../main/java/org/apache/juneau/rest/client/classic/RestRequest.java   | 3 ++-
 .../src/main/java/org/apache/juneau/http/classic/HttpHeaders.java      | 3 ++-
 17 files changed, 34 insertions(+), 14 deletions(-)

diff --git 
a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlBuilder.java
 
b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlBuilder.java
index f3108cce5f..86d068690e 100644
--- 
a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlBuilder.java
+++ 
b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlBuilder.java
@@ -126,6 +126,9 @@ package org.apache.juneau.bean.html5;
  *     <li class='link'><a class="doclink" 
href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5";>juneau-bean-html5</a>
  * </ul>
  */
+@SuppressWarnings({
+       "java:S6539" // Monster class; HtmlBuilder is intentionally a single 
static-factory facade, one creator method per HTML5 element
+})
 public class HtmlBuilder {
 
        /**
diff --git 
a/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchema.java
 
b/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchema.java
index 2a6ffdf1d7..39f8ad5475 100644
--- 
a/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchema.java
+++ 
b/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchema.java
@@ -202,7 +202,8 @@ import org.apache.juneau.marshall.swap.*;
 @Marshalled(typeName = "schema")
 @SuppressWarnings({
        "java:S116", // Field names follow OpenAPI/JSON Schema spec
-       "java:S119"  // 'SELF' (CRTP self-type) is intentional and clearer than 
a single-letter name.
+       "java:S119", // 'SELF' (CRTP self-type) is intentional and clearer than 
a single-letter name.
+       "java:S6539" // Monster class; JsonSchema intentionally models the 
entire JSON Schema Draft 2020-12 keyword set as one cohesive bean
 })
 public class JsonSchema<SELF extends JsonSchema<SELF>> {
 
diff --git 
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/bean/BeanMeta.java
 
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/bean/BeanMeta.java
index 489868829b..02d2715cd0 100644
--- 
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/bean/BeanMeta.java
+++ 
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/bean/BeanMeta.java
@@ -78,7 +78,8 @@ import org.apache.juneau.commons.utils.*;
  */
 @SuppressWarnings({
        "java:S115", // Constants use UPPER_snakeCase convention (e.g., 
PROP_class)
-       "java:S1200" // Central bean-introspection type; high coupling to 
annotations/reflect/utils is inherent to its role
+       "java:S1200", // Central bean-introspection type; high coupling to 
annotations/reflect/utils is inherent to its role
+       "java:S6539" // Monster class; BeanMeta is intentionally a single 
cohesive bean-introspection metadata cache
 })
 public class BeanMeta<T> {
 
diff --git 
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/inject/BeanInstantiator.java
 
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/inject/BeanInstantiator.java
index 7d3cbddb83..6e5a99d89a 100644
--- 
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/inject/BeanInstantiator.java
+++ 
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/inject/BeanInstantiator.java
@@ -188,7 +188,8 @@ import org.apache.juneau.commons.reflect.*;
  */
 @SuppressWarnings({
        "java:S115", // Constants use UPPER_snakeCase convention
-       "resource" // transient build-time scratch store; lifetime is bounded 
by the Builder itself, no foreign resources are captured
+       "resource", // transient build-time scratch store; lifetime is bounded 
by the Builder itself, no foreign resources are captured
+       "java:S6539" // Monster class; BeanInstantiator intentionally 
centralizes multi-strategy bean-instantiation auto-wiring
 })
 public class BeanInstantiator<T> {
 
diff --git 
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/ClassInfo.java
 
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/ClassInfo.java
index e22505ebb2..e5724366a7 100644
--- 
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/ClassInfo.java
+++ 
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/ClassInfo.java
@@ -72,7 +72,8 @@ import org.apache.juneau.commons.inject.*;
        "unchecked", // Type erasure requires unchecked casts
        "rawtypes", // Raw types necessary for generic type handling
        "java:S115", // Constants use UPPER_snakeCase naming convention
-       "java:S1452"  // Wildcard required - List<AnnotationInfo<? extends 
Annotation>>, List<TypeVariable<?>>
+       "java:S1452", // Wildcard required - List<AnnotationInfo<? extends 
Annotation>>, List<TypeVariable<?>>
+       "java:S6539" // Monster class; ClassInfo is intentionally a single 
cohesive reflection-metadata facade over Class
 })
 public non-sealed class ClassInfo extends ElementInfo implements Annotatable, 
Type, Comparable<ClassInfo> {
 
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 4e8c6755c9..14d1d42cb8 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
@@ -123,7 +123,8 @@ import org.apache.juneau.commons.collections.*;
  * </ul>
  */
 @SuppressWarnings({
-       "java:S115" // Constants use UPPER_snakeCase convention
+       "java:S115", // Constants use UPPER_snakeCase convention
+       "java:S6539" // Monster class; CollectionUtils is intentionally a 
single cohesive collection-utility hub, not a set of unrelated responsibilities
 })
 public class CollectionUtils {
 
diff --git 
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/utils/Shorts.java
 
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/utils/Shorts.java
index 12538dd35c..ca52b6fe7f 100644
--- 
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/utils/Shorts.java
+++ 
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/utils/Shorts.java
@@ -54,7 +54,8 @@ import org.apache.juneau.commons.reflect.*;
  * replace {@code import static ...utils.Utils.*} with {@code import static 
...utils.Shorts.*}.
  */
 @SuppressWarnings({
-       "java:S1118" // Utility facade with static methods only.
+       "java:S1118", // Utility facade with static methods only.
+       "java:S6539" // Monster class; Shorts is intentionally a single 
terse-alias factory facade, each method tiny and independent
 })
 public class Shorts {
 
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 598bf7fabc..fc49277272 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
@@ -57,7 +57,8 @@ import org.apache.juneau.commons.reflect.*;
        "java:S115",  // Constant names use UPPER_snakeCase convention
        "java:S1192", // Duplicated string literals (HTML entities) are 
intentional
        "java:S5843", // FP_REGEX copied from JDK source for parsing consistency
-       "java:S3516"  // Methods flagged as always returning the same value are 
valid utility implementations (e.g. null-safe wrappers)
+       "java:S3516", // Methods flagged as always returning the same value are 
valid utility implementations (e.g. null-safe wrappers)
+       "java:S6539"  // Monster class; StringUtils is intentionally a single 
cohesive string-utility hub, not a set of unrelated responsibilities
 })
 public class StringUtils {
 
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/MarshallingContext.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/MarshallingContext.java
index ecf0444d74..41a60ecd5e 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/MarshallingContext.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/MarshallingContext.java
@@ -177,7 +177,7 @@ import org.apache.juneau.marshall.utils.*;
 @SuppressWarnings({
        "unchecked",  // Type erasure requires unchecked casts
        "rawtypes",   // Raw types necessary for generic type handling
-       "java:S6539", // Collection.toArray() usage intentional
+       "java:S6539", // Monster class; MarshallingContext is intentionally the 
central bean-context configuration hub (also covers Collection.toArray() usage)
        "java:S115",  // Constants use UPPER_snakeCase naming convention
        "java:S1452", // Wildcard required - ClassMeta<?> for parameter 
resolution and type variables
        "java:S1612"  // Lambdas used instead of method references for 
readability in complex chained expressions
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/collections/MarshalledMap.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/collections/MarshalledMap.java
index 698d15aa68..83335ae922 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/collections/MarshalledMap.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/collections/MarshalledMap.java
@@ -55,7 +55,8 @@ import org.apache.juneau.marshall.swap.*;
  * </ul>
  */
 @SuppressWarnings({
-       "java:S2160" // equals() / hashCode() inherited from LinkedHashMap; map 
equality is element-based
+       "java:S2160", // equals() / hashCode() inherited from LinkedHashMap; 
map equality is element-based
+       "java:S6539"  // Monster class; MarshalledMap's large method surface 
follows directly from implementing the Map contract plus path-navigation helpers
 })
 public class MarshalledMap extends LinkedHashMap<String,Object> {
 
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/httppart/HttpPartSchema.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/httppart/HttpPartSchema.java
index 74c6fb83c4..e1a068b2ed 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/httppart/HttpPartSchema.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/httppart/HttpPartSchema.java
@@ -92,7 +92,8 @@ import org.apache.juneau.marshall.parser.*;
        "java:S116", // Field names use trailing underscores (default_, enum_, 
const_) to avoid Java keyword conflicts
        "java:S115", // Constants use UPPER_snakeCase convention (e.g., 
PROP_additionalProperties)
        "java:S5843", // Complex regex patterns needed for RFC compliance 
(IPv6, ISO 8601 duration, date-time formats)
-       "java:S1452"  // Wildcard required for parsed type metadata
+       "java:S1452", // Wildcard required for parsed type metadata
+       "java:S6539"  // Monster class; HttpPartSchema is intentionally a 
single cohesive OpenAPI/HTTP-part schema model+validator
 })
 public class HttpPartSchema {
 
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/marshaller/MarshallUtils.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/marshaller/MarshallUtils.java
index 066d8f7398..698a83aac6 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/marshaller/MarshallUtils.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/marshaller/MarshallUtils.java
@@ -63,6 +63,9 @@ import org.apache.juneau.marshall.serializer.*;
  *     <li class='link'><a class="doclink" 
href="https://juneau.apache.org/docs/topics/Marshallers";>Marshallers</a>
  * </ul>
  */
+@SuppressWarnings({
+       "java:S6539" // Monster class; MarshallUtils is intentionally a single 
cohesive terse-marshalling-facade hub, one method family per format
+})
 public final class MarshallUtils {
 
        private MarshallUtils() {}
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/parquet/ParquetParserSession.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/parquet/ParquetParserSession.java
index 580d8e1972..eab6cf89f2 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/parquet/ParquetParserSession.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/parquet/ParquetParserSession.java
@@ -41,7 +41,8 @@ import org.apache.juneau.marshall.stream.*;
        "java:S3776",
        "java:S6541", // Brain Method: Parquet parsing/serialization flows are 
inherently branchy
        "java:S1192", // Duplicated literals (.list.element, 
root.list.element., value) are schema keys; constants would obscure
-       "resource"    // RecordReader returned by RecordAdapter is a Closeable 
owned by the caller; Eclipse JDT @Owning warning is by design.
+       "resource",   // RecordReader returned by RecordAdapter is a Closeable 
owned by the caller; Eclipse JDT @Owning warning is by design.
+       "java:S6539"  // Monster class; ParquetParserSession is intentionally a 
single cohesive Parquet codec session
 })
 public class ParquetParserSession extends InputStreamParserSession implements 
RecordReadable, ArrayRecordReadable {
 
diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/serializer/SerializerSession.java
 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/serializer/SerializerSession.java
index c08d8ae5d5..30f122b549 100644
--- 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/serializer/SerializerSession.java
+++ 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshall/serializer/SerializerSession.java
@@ -78,7 +78,8 @@ import org.apache.juneau.marshall.utils.*;
        "java:S115",  // Constants use UPPER_snakeCase convention
        "rawtypes",   // Raw types necessary for generic type handling 
throughout serializer session
        "unchecked", // Type erasure requires unchecked casts throughout 
serializer session
-       "resource"   // Internal helpers return Closeables wired into pipe 
lifecycle; Eclipse JDT @Owning warning is by design.
+       "resource",  // Internal helpers return Closeables wired into pipe 
lifecycle; Eclipse JDT @Owning warning is by design.
+       "java:S6539" // Monster class; SerializerSession is intentionally the 
core per-run serialization session base, aggregating traversal/formatting state
 })
 public class SerializerSession extends MarshallingTraverseSession {
 
diff --git 
a/juneau-rest/juneau-rest-client-classic/src/main/java/org/apache/juneau/rest/client/classic/RestClient.java
 
b/juneau-rest/juneau-rest-client-classic/src/main/java/org/apache/juneau/rest/client/classic/RestClient.java
index eb9f4dce11..9a8fc38e75 100644
--- 
a/juneau-rest/juneau-rest-client-classic/src/main/java/org/apache/juneau/rest/client/classic/RestClient.java
+++ 
b/juneau-rest/juneau-rest-client-classic/src/main/java/org/apache/juneau/rest/client/classic/RestClient.java
@@ -1070,6 +1070,7 @@ import org.apache.juneau.rest.client.classic.remote.*;
        "resource",  // Resource management handled externally
        "java:S106",  // System.err is the intentional default fallback for the 
configurable console PrintStream
        "java:S115", // Constants use UPPER_snakeCase naming convention
+       "java:S6539" // Monster class; RestClient is intentionally a single 
fluent builder/client aggregating config, call orchestration, and remote-proxy 
wiring
 })
 public class RestClient extends MarshallingContextable implements HttpClient, 
Closeable {
 
diff --git 
a/juneau-rest/juneau-rest-client-classic/src/main/java/org/apache/juneau/rest/client/classic/RestRequest.java
 
b/juneau-rest/juneau-rest-client-classic/src/main/java/org/apache/juneau/rest/client/classic/RestRequest.java
index 13e8d5498f..0ab695244f 100644
--- 
a/juneau-rest/juneau-rest-client-classic/src/main/java/org/apache/juneau/rest/client/classic/RestRequest.java
+++ 
b/juneau-rest/juneau-rest-client-classic/src/main/java/org/apache/juneau/rest/client/classic/RestRequest.java
@@ -110,7 +110,8 @@ import org.apache.juneau.marshall.xml.*;
        "java:S115",  // Constants use UPPER_snakeCase naming convention
        "resource",   // Resource management handled externally
        "java:S3740", // Raw Class/Supplier types used for fluent REST request 
building where response type is unknown at construction time
-       "java:S1133"  // Intentional deprecation retained for backward 
compatibility until the documented removal; the reminder is not actionable now.
+       "java:S1133", // Intentional deprecation retained for backward 
compatibility until the documented removal; the reminder is not actionable now.
+       "java:S6539"  // Monster class; RestRequest is intentionally a single 
per-request fluent builder aggregating headers/query/form/body/serialization 
config
 })
 public class RestRequest extends MarshallingSession implements HttpUriRequest, 
Configurable, AutoCloseable {
 
diff --git 
a/juneau-rest/juneau-rest-common-classic/src/main/java/org/apache/juneau/http/classic/HttpHeaders.java
 
b/juneau-rest/juneau-rest-common-classic/src/main/java/org/apache/juneau/http/classic/HttpHeaders.java
index 93331ad686..30fcd9a6cf 100644
--- 
a/juneau-rest/juneau-rest-common-classic/src/main/java/org/apache/juneau/http/classic/HttpHeaders.java
+++ 
b/juneau-rest/juneau-rest-common-classic/src/main/java/org/apache/juneau/http/classic/HttpHeaders.java
@@ -95,7 +95,8 @@ import org.apache.juneau.marshall.oapi.*;
  * </ul>
  */
 @SuppressWarnings({
-       "java:S3740" // Raw Supplier/Header types used in factory methods where 
HTTP header value type cannot be statically parameterized
+       "java:S3740", // Raw Supplier/Header types used in factory methods 
where HTTP header value type cannot be statically parameterized
+       "java:S6539"  // Monster class; HttpHeaders is intentionally a single 
static-factory facade, one creator method per standard HTTP header
 })
 public class HttpHeaders {
 

Reply via email to