Skip to content

chore: remove dead code and guard empty icon filename in MainRepository#63

Open
LeGeRyChEeSe wants to merge 1 commit into
mainfrom
chore/remove-dead-code-mainrepository
Open

chore: remove dead code and guard empty icon filename in MainRepository#63
LeGeRyChEeSe wants to merge 1 commit into
mainfrom
chore/remove-dead-code-mainrepository

Conversation

@LeGeRyChEeSe

Copy link
Copy Markdown
Owner

Objectif

Nettoyage groupé (A4 + A5 du backlog) : suppression de code mort confirmé, et un garde de robustesse mineur dans le même fichier.

Changements

  • Suppression de val config: ServerConfig? = null — jamais réassigné, jamais lu ailleurs (confirmé par grep).
  • Suppression de resolveUserTier() — aucun appelant (seul resolveUserTierOrDefault() est utilisé).
  • Suppression de fetchConfig()@Deprecated, retourne toujours null, aucun appelant.
  • Suppression de l'import PublicConfig devenu inutilisé.
  • extractMetaToCache() : la branche d'extraction des icônes (.png/.jpg) ne testait pas fileName.isNotEmpty() avant File(iconsDir, fileName), contrairement aux branches thumbnails/notes/trailers. Ajout du même garde.

Vérification

  • Build : scripts\gradlew.bat :app:assembleDevDebug → succès.
  • Tests JVM : scripts\gradlew.bat :app:testDevDebugUnitTest → succès (aucune régression).
  • Smoke-test émulateur (Pixel_7, com.vrhub.debug) : lancement à froid sans crash, logcat propre.

Réf : docs/sonnet5-specs/01-bug-audit-backlog.md#a4--code-mort--propriété-trompeuse et #a5--extraction-meta--garde-de-nom-de-fichier-icône-incomplète

- Remove val config: ServerConfig? (always null, never reassigned,
  never read).
- Remove resolveUserTier() (unused; only resolveUserTierOrDefault() is
  called anywhere).
- Remove fetchConfig() (@deprecated, always returns null, no callers).
- Drop the now-unused PublicConfig import.
- Guard the icon extraction branch in extractMetaToCache() with
  fileName.isNotEmpty(), matching the thumbnails/notes/trailers
  branches, so a 7z entry ending in "/" can't produce a File with an
  empty name.
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit 679bc85.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

PR Validation Summary ✅

Status: All checks passed!
Core Duration: 4m 18s ✅ (Target < 5m)

Check Status Details
Lint ✅ Pass N/A Errors, N/A Warnings
Unit Tests ✅ Pass JUnit Reports
Build ✅ Pass assembleDevDebug

Reports and artifacts (including Lint HTML) are available in the Artifacts Tab of the Action Run Summary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant