Skip to content

Mark the Pair-varargs logging helpers @SafeVarargs - #98

Merged
jgindin merged 1 commit into
mainfrom
safevarargs-logging
Nov 27, 2026
Merged

jgindin merged 1 commit into
mainfrom
safevarargs-logging

Conversation

@jgindin

@jgindin jgindin commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Marks the logging helpers that take Pair varargs @SafeVarargs, which clears six of javac's eight "unchecked" warnings.

  • LogUtils.logError, its LogErrorTask constructor, and ZmanimService's ZmanCallback.log only read the Pairs they're given. The ZmanCallback.log override becomes final, since @SafeVarargs needs a method that can't be overridden.
  • The //noinspection unchecked comments at two callers in AppUpgrader and ZmanimService are removed, since there's nothing left to suppress.
  • The two warnings left are ZmanimPresenterImpl's AsyncTask.publishProgress and onProgressUpdate, which belong to the AsyncTask code.

🤖 Generated with Claude Code

LogUtils.logError, its task and ZmanimService's ZmanCallback.log only read the Pairs they are given, so javac no longer warns that their callers create generic arrays. The noinspection comments at two of those callers go too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jgindin
jgindin force-pushed the safevarargs-logging branch from 70f44a5 to 94f191d Compare November 26, 2026 20:51
@jgindin
jgindin merged commit 80cebb3 into main Nov 27, 2026
4 checks passed
@jgindin
jgindin deleted the safevarargs-logging branch November 27, 2026 19:22
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