Skip to content

Avoid passing “new List<...>()” as an unused parameter #20

@edunzer

Description

@edunzer

In onsite-gap exception creation, you call addSplitExceptions(..., allExceptions, new List<pse__Schedule_Exception__c>()) but never use that list later.

How to fix: Pass null and guard in addSplitExceptions, or reuse a dedicated onsiteGapExceptions list if you want to report it separately later.

File: ScheduleHoursDistributor.cls (onsite gap creation + addSplitExceptions signature)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions