Skip to content

Remove unnecessary generic from JobKeyGenerator interface #4886

Open
@patrickwinti

Description

@patrickwinti

The JobKeyGenerator<T> interface currently uses a generic type parameter <T> to represent the source used to generate a job key. However, in practice, the implementations and usages of this interface rely on JobParameters as the source type.

Since the generic parameter is not providing meaningful flexibility and introduces unnecessary complexity (e.g., requiring casts or wildcard types in consumers), it would be cleaner to refactor the interface to:

public interface JobKeyGenerator {
    String generateKey(JobParameters source);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions