[MNG-7439] Make fields of CliRequest protected
- Dominant language
- Java
- Stars
- 5.3k
- Forks
- 3.1k
- Avg merge
- 20h 42m
- Merged PRs (30d)
- 297
Description
**[Thomas Zub](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=JIRAUSER287005)** opened **[MNG-7439](https://issues.apache.org/jira/browse/MNG-7439?redirect=false)** and commented
Hi,
currently the fields of
```java
org.apache.maven.cli.CliRequest
```
have the default access modifier. As no setters are provided, custom modifications to e.g. multiModuleProjectDirectory can not be made without e.g. reflection or change of the system properties.
As an implementation of CliRequest with bean properties (private fields, getters and setters) would be possibly a breaking change, I suggest to make the fields protected to enable proper subclassing for custom modifications.
I would appreciate to make a PR if needed/wanted.
Kind regards
Thomas
---
**Affects:** 3.8.5
Contributor guide
Research direction
Start with the org.apache.maven.cli.CliRequest class and inspect its fields and existing access patterns. Change the fields' visibility as requested, then verify that a subclass can modify the relevant request values without reflection or system-property changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100