apache / apache/polaris

Drop redundant getOperation() overrides in the AuthorizationIntent records

Open Beginner friendly
#5,506 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.1k
Forks
522
Avg merge
1d 22h
Merged PRs (30d)
137

Description

`AuthorizationIntent` exposes the operation through `getOperation()`. All seven implementations are records with an `operation` component, so their generated accessor is `operation()` — which means every record has to add a `getOperation()` override that just forwards to it.

The neighboring records already use canonical accessors (`AuthorizationRequest.principal()`/`intents()`, `ResolvedIntent.targets()`/`secondaries()`), so `getOperation()` is the only bean-style getter left in this area.

Renaming `getOperation()` to `operation()` lets each record's generated accessor implement the interface directly, so all seven overrides can go away. Pure rename, no behavior change.

Contributor guide

Open the contributing guide

Research direction

Search for the seven AuthorizationIntent record implementations and their getOperation() overrides, then compare them with AuthorizationRequest and ResolvedIntent canonical accessors. Rename the interface method to operation() and remove the redundant overrides; done means all seven records use their generated accessors with no behavior change.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
authorization
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.