Skip to content

Add options for getting cached entries and aliasService filter#180

Merged
tudddorrr merged 1 commit intodevelopfrom
cached-entries-options
Feb 25, 2026
Merged

Add options for getting cached entries and aliasService filter#180
tudddorrr merged 1 commit intodevelopfrom
cached-entries-options

Conversation

@tudddorrr
Copy link
Contributor

No description provided.

@tudddorrr tudddorrr added the enhancement New feature or request label Feb 25, 2026
@claude
Copy link

claude bot commented Feb 25, 2026

PR Review: Add options for getting cached entries and aliasService filter

The PR is small and well-structured. Overall the approach is sound — adding aliasService to GetEntriesOptions and introducing GetCachedEntriesOptions for client-side filtering is a clean, consistent extension of the existing API.


🔵 Minor — Potential NullReferenceException in playerId filter

GetCachedEntries (line 56) accesses e.playerAlias.player.id without a null guard:

// Current
(string.IsNullOrEmpty(options.playerId) || e.playerAlias.player.id == options.playerId)

Player is a reference type (public Player player; in PlayerAlias.cs). If a cached entry ever has a null player (e.g., from a partial API response or a future API change), this throws rather than gracefully filtering. The existing GetCachedEntriesForCurrentPlayer only accessed e.playerAlias.id (an int), so this is a new, deeper access path.

// Safer
(string.IsNullOrEmpty(options.playerId) || e.playerAlias?.player?.id == options.playerId)

No issues found

  • Code quality: Consistent with existing patterns; [Obsolete] attribution is appropriate and the message is clear.
  • Performance: No concerns for a local list filter.
  • Security: No concerns.
  • Backwards compatibility: Handled correctly — GetCachedEntries signature change uses an optional parameter, and GetCachedEntriesForCurrentPlayer is properly deprecated rather than removed.

@tudddorrr tudddorrr merged commit 235c5f0 into develop Feb 25, 2026
2 checks passed
@tudddorrr tudddorrr deleted the cached-entries-options branch February 25, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant