Skip to content

[Tizen.Applications.Common] Replace manual null checks with ArgumentNullException.ThrowIfNull()#7566

Open
JoonghyunCho wants to merge 1 commit intomainfrom
ai-task/issue-7548
Open

[Tizen.Applications.Common] Replace manual null checks with ArgumentNullException.ThrowIfNull()#7566
JoonghyunCho wants to merge 1 commit intomainfrom
ai-task/issue-7548

Conversation

@JoonghyunCho
Copy link
Copy Markdown
Member

Closes #7548

Summary

Converts 11 manual 4-line null-check patterns in Tizen.Applications.Common to ArgumentNullException.ThrowIfNull() (.NET 6+ API).

Before (repeated pattern):

if (value == null)
{
    throw new ArgumentNullException(nameof(value));
}

After:

ArgumentNullException.ThrowIfNull(value);

Files Changed

File Occurrences
Application.cs 1 (args)
ApplicationManager.cs 1 (caller)
ReceivedAppControl.cs 1 (replyRequest)
CoreApplication.cs 2 (runner)
CoreTask.cs 2 (runner)
Bundle.cs 4 (handle, value ×2, argv)

Excluded (non-conforming patterns — extra constructor arguments or non-null conditions):

  • Bundle.cs line 75: ArgumentNullException(nameof(handle), "handle is invalid") — extra message
  • Bundle.cs line 86: ArgumentNullException(nameof(handle), e.Message) — extra message
  • AppControl.cs: extra constructor arguments

Impact

  • 6 files changed: -44 lines / +11 lines (net -33)
  • No public API changes; behavior preserved (ThrowIfNull is functionally equivalent)
  • Build: 0 errors, 4 pre-existing warnings (unchanged)

Benchmark

Device benchmark skipped — no sdb target available in build environment.

@github-actions github-actions bot added the API14 Platform : Tizen 11.0 / TFM: net8.0-tizen11.0 label Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-task API14 Platform : Tizen 11.0 / TFM: net8.0-tizen11.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[AI Refactoring] ArgumentNullException.ThrowIfNull() 일괄 전환

1 participant