Skip to content

[8.2] utils: drop XmlSer blanket suppress and scoped cast residuals - #3347

Merged
natechadwick merged 1 commit into
mainfrom
fix/issue-3172-utils-xmlser-casts
Aug 13, 2026
Merged

natechadwick merged 1 commit into
mainfrom
fix/issue-3172-utils-xmlser-casts

Conversation

@natechadwick-intsof

Copy link
Copy Markdown
Collaborator

Summary

Second implementable residual after utils batch 8 (#3015 / PR #3173) and the merged CRTP slice (PR #3277). This PR removes more main-source suppressions without touching PSWorkflowUtilsBase public raw List/Map APIs (source-compat; still needs an explicit policy).

  • PSXmlSerializationHelper: drop class-level @SuppressWarnings({"rawtypes","unchecked"}). Parameterize leftover raw Class as Class<?> on readFromXML / Jackson path (erasure-identical).
  • PSCollection(String): assign Class.forName to the existing Class<?> field instead of an unchecked Class<? extends E> constructor cast.
  • PSItemIterator: collapse two method-scoped unchecked Map<?,?> casts into one private asItem helper (no new blanket suppress).

Not in this PR (policy / inherent):

  • PSWorkflowUtilsBase public raw List/Map APIs.
  • PSCopier nested Map-as-V unchecked (generic recursion).
  • PSConcurrentList.restoreList generic deserialization cast.

Parent tracker: #2200. Module parent: #2016. Prior slice: #3277.

Fixes #3172

Operator: Grok: night-issue-prs (model grok-4.5)

Test plan

  1. cd modules/utils && ..\..\mvnw.cmd clean install (Windows) or ../../mvnw clean install (Unix).
  2. Confirm new tests: PSXmlSerializationHelperTest.readFromXmlAcceptsExplicitClassWildcard, PSCollectionTypedTest.classNameCtorLoadsMemberClassWithoutUncheckedCast, PSItemIteratorTest.multiMapRejectsNonCollectionValues.
  3. No UI / Playwright — internal generics only.

Checklist

  • Product documentation — N/A (not product-facing): internal javac/generics tech-debt; no operator/admin/API behavior change
  • Unit / module tests — behavioral tests for Class<?> read, className ctor, multi-map reject; standalone modules/utils mvnw clean install green
  • WebUI + Playwright — N/A (no WebUI product screen change)
  • Build gates — standalone clean install (no skipTests); C2 greps for extends PSXmlSerializationHelper / anonymous subclass
  • Cross-platform — N/A (no path/file I/O in this change)

C3 evidence

  • modules_built: modules/utils
  • build_evidence: cd modules/utils && ..\..\mvnw.cmd clean install → BUILD SUCCESS; Tests run: 387, Failures: 0, Errors: 0, Skipped: 9
  • downstream_checked: C2 applied (Class → Class<?> public static param; same erasure). Grep monorepo extends PSXmlSerializationHelper and new PSXmlSerializationHelper → no subclasses. No final/sealed. Downstream standalone not required.

C5 UI proof

N/A — no WebUI / Playwright surface.

Co-Authored by Grok Build using grok-4.5 with agent main.

…3172)

Remove PSXmlSerializationHelper class-level rawtypes/unchecked by using
Class<?>. Load PSCollection(String) via Class.forName into Class<?> without
an unchecked ctor cast. Collapse PSItemIterator Map<?,?> casts into one
asItem helper. Do not reparameterize PSWorkflowUtilsBase public raw APIs.

Fixes #3172

> Co-Authored by Grok Build using grok-4.5 with agent main.
@kilo-code-bot

kilo-code-bot Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (6 files)
  • modules/utils/src/main/java/com/percussion/services/utils/xml/PSXmlSerializationHelper.java
  • modules/utils/src/main/java/com/percussion/util/PSCollection.java
  • modules/utils/src/main/java/com/percussion/utils/jsr170/PSItemIterator.java
  • modules/utils/src/test/java/com/percussion/services/utils/xml/PSXmlSerializationHelperTest.java
  • modules/utils/src/test/java/com/percussion/util/PSCollectionTypedTest.java
  • modules/utils/src/test/java/com/percussion/utils/PSItemIteratorTest.java
  • docs/ai-generated/code-reviews/issue-3172-utils-javac-residuals-erlang.md

Reviewed by step-3.7-flash · Input: 67.7K · Output: 8.7K · Cached: 317.4K

Review guidance: REVIEW.md from base branch main

@natechadwick
natechadwick merged commit 6c98f17 into main Aug 13, 2026
6 checks passed
@natechadwick
natechadwick deleted the fix/issue-3172-utils-xmlser-casts branch August 13, 2026 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

model:grok-4.5 Grok 4.5 model operator:grok Changes authored by Grok operator:night-issue-prs night-issue-prs workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[8.2] utils javac residual after batch 8 (WorkflowUtilsBase raw + XmlSer + cast residuals)

2 participants