Skip to content

fix(perc-system): type server.cache raw collections (#2877) - #3161

Merged
natechadwick merged 3 commits into
mainfrom
fix/issue-2877-server-cache-rawtypes
Aug 12, 2026
Merged

natechadwick merged 3 commits into
mainfrom
fix/issue-2877-server-cache-rawtypes

Conversation

@natechadwick-intsof

Copy link
Copy Markdown
Collaborator

Summary

Partial fix for #2877 (parent epic #2022, grandparent #2200, residual of #2299).

PR-sized com.percussion.server.cache -Xlint rawtypes/unchecked batch with real generics.

Changed

  • PSContentItemDependencyTree — Map<Integer,List<PSItemDependency>>, typed List<String[]> dependency results, Map<Integer,Integer> done maps, ItemSet extends HashSet<Item>
  • PSMultiLevelCache — nested Map<Object,Object> cache tree, typed listener lists
  • PSAssemblerCacheHandler / PSResourceCacheHandler — Map<String,?> flush/validateKeys; typed dependency flush lists; resource dep tree maps
  • IPSCacheHandler / PSCacheHandler / PSCacheManager — flush/validateKeys Map<String,?>
  • PSKeyRules, aging/memory managers, proxies/exits, PSItemSummaryCache folder-id lists
  • Test: PSServerCachePackageTypedTest

Out of scope (residual)

Test plan

  • cd system && ../mvnw.cmd test -Dtest=PSServerCachePackageTypedTest,PSMultiLevelCacheTest → Tests run: 7, Failures: 0
  • cd system && ../mvnw.cmd clean install → BUILD SUCCESS, Tests run: 1955, Failures: 0, Errors: 0, Skipped: 241
  • No new product-facing behavior; typing only

Gates evidence

  • modules_built: system
  • build_evidence: cd system; ../mvnw.cmd clean install → BUILD SUCCESS; Tests run: 1955, Failures: 0, Errors: 0, Skipped: 241
  • downstream_checked: grepped monorepo for PSCacheManager.flush / validateKeys / PSCacheProxy.flush*; in-module callers already use Map<String,String> or no-arg flush; generics erasure preserves binary callers (CacheProxy static helpers)

Product documentation

  • N/A — pure tech-debt generics/-Xlint cleanup; no operator/user/API behavior change

Fixes / Partial

Partial for #2877 — residual #3160 filed for remaining perc-system packages.

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

Parent tracker: #2022

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

Partial residual of #2299 / parent #2022. Parameterize MultiLevelCache,
dependency tree, assembler/resource handlers, and cache manager flush maps
with real generics. Add PSServerCachePackageTypedTest.

> Co-Authored by Grok Build using grok-4.5 with agent main.
Comment thread system/src/main/java/com/percussion/server/cache/PSItemSummaryCache.java Outdated
@kilo-code-bot

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

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • system/src/main/java/com/percussion/server/cache/PSItemSummaryCache.java - comment-only update; no functional change
Previous Review Summaries (2 snapshots, latest commit 8495722)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 8495722)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
system/src/main/java/com/percussion/server/cache/PSItemSummaryCache.java 940 Comment references ids[i++] but the removed code used ids[i] = idList.get(i) with no double-increment. The comment describes a bug from an earlier version, not the code just removed.
Files Reviewed (3 files)
  • system/src/main/java/com/percussion/server/cache/PSContentItemDependencyTree.java
  • system/src/main/java/com/percussion/server/cache/PSItemSummaryCache.java
  • system/src/test/java/com/percussion/server/cache/PSServerCachePackageTypedTest.java

Fix these issues in Kilo Cloud

Previous review (commit 7318e2a)

Status: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 1
Issue Details (click to expand)

WARNING

File Line Issue
system/src/main/java/com/percussion/server/cache/PSItemSummaryCache.java 940 loadFolderAcls contains an unintended behavior change — the old ids[i++] = id; was a latent bug that skipped every other folder ID, and the new ids[i] = idList.get(i); fixes it. This is an unannounced behavioral change in a PR described as having "no operator/user/API behavior change".
system/src/test/java/com/percussion/server/cache/PSServerCachePackageTypedTest.java 111 `assertTrue(!owners.hasNext()

SUGGESTION

File Line Issue
system/src/main/java/com/percussion/server/cache/PSContentItemDependencyTree.java 528 getOwners return type changed from raw Iterator to Iterator<Integer>. While bytecode-compatible via erasure, this is a source-level public API change. Since the method is only used within the package (from the new test), practical risk is low, but it deviates from the PR's stated "no API behavior change" goal.
Files Reviewed (15 files)
  • system/src/main/java/com/percussion/server/cache/IPSCacheHandler.java
  • system/src/main/java/com/percussion/server/cache/PSAssemblerCacheHandler.java
  • system/src/main/java/com/percussion/server/cache/PSCacheAgingManager.java
  • system/src/main/java/com/percussion/server/cache/PSCacheHandler.java
  • system/src/main/java/com/percussion/server/cache/PSCacheManager.java
  • system/src/main/java/com/percussion/server/cache/PSCacheMemoryManager.java
  • system/src/main/java/com/percussion/server/cache/PSCacheProxy.java
  • system/src/main/java/com/percussion/server/cache/PSContentItemDependencyTree.java
  • system/src/main/java/com/percussion/server/cache/PSExitFlushAssemblerCache.java
  • system/src/main/java/com/percussion/server/cache/PSItemSummaryCache.java
  • system/src/main/java/com/percussion/server/cache/PSKeyRules.java
  • system/src/main/java/com/percussion/server/cache/PSMultiLevelCache.java
  • system/src/main/java/com/percussion/server/cache/PSResourceCacheHandler.java
  • system/src/test/java/com/percussion/server/cache/PSServerCachePackageTypedTest.java
  • docs/ai-generated/code-reviews/issue-2877-server-cache-rawtypes-erlang.md

Fix these issues in Kilo Cloud


Reviewed by step-3.7-flash · Input: 44.6K · Output: 2.6K · Cached: 294.4K

Review guidance: REVIEW.md from base branch main

Remove dead loadFolderAcls int[] conversion (latent double-increment never
affected runtime; bulk load uses null). Fix empty-owners assertion tautology.
Document getOwners Iterator<Integer> generification (binary-compatible).

> Co-Authored by Grok Build using grok-4.5 with agent overnight-pr-follow-up.
Comment thread system/src/main/java/com/percussion/server/cache/PSItemSummaryCache.java Outdated
Reword the comment to quote the exact removed loop (ids[i++] inside for-i)
so review readers do not confuse it with a single-index assignment form.

> Co-Authored by Grok Build using grok with agent overnight-pr-followup.
@natechadwick
natechadwick merged commit 51cc6b4 into main Aug 12, 2026
6 checks passed
@natechadwick
natechadwick deleted the fix/issue-2877-server-cache-rawtypes branch August 12, 2026 13:58
natechadwick pushed a commit that referenced this pull request Aug 12, 2026
…) (#3190)

* fix(perc-system): type security package residual raw collections (#3182)

Residual Xlint rawtypes/unchecked cleanup under com.percussion.security and
design.catalog.security after prior cataloger/Jndi/RoleManager batches.

- Type backend connection attr maps, ACL-adjacent handlers, JNDI filter multi-values
- Fix PSDirectoryDefinition additional-returns null merge
- Drop unused raw ACL enumeration; type design.catalog.security lists/entries
- PSSecurityPackageTypedTest (5); system clean install green

Parent epic #2022. Avoids open PR #3161/#3171 paths.

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

* fix(perc-system): address Kilo review on security Xlint residual (#3182)

- Sort m_columns for deterministic SELECT column order
- prepareStatement(List<?>) for List<Object>/List<String> source compat
- buildFilter fails fast on non-String/non-Collection values
- Drop misleading PASSWORD value assert; add legacy list + fail-fast tests

system clean install green (1961 tests).

> Co-Authored by Grok Build using grok-4.5 with agent overnight-pr-followup.
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.

2 participants