Use protected for members in generated service classes#33919
Use protected for members in generated service classes#33919DhairyasheelS wants to merge 1 commit into
Conversation
Generated service classes are meant to be extended (e.g. ExtendedFooService extends FooService), but private fields and helper methods prevent clean subclassing. Switch them to protected so the generated services follow the open/closed principle. Scope is limited to service classes: - inject_template injected fields become protected, gated by the existing isController flag so REST controllers stay private (they use a parallel @RestController extension pattern, not inheritance) - UserService fields and helper methods become protected - updateIfPresent in the entity service implementation becomes protected Class-level constants (private static final Logger) are left untouched. Closes jhipster#33715
|
Hi !! @vw98075 can you trigger CI/CD please? i want to verify all tests |
|
Hi @vw98075 @DanielFran !! — the 3 red sample jobs on this PR don't look code-related and I can't re-run them myself. Could you take a look / re-run when you have a moment? Summary: all 3 failures are Node 24 jobs that crash during Exit 134 = SIGABRT — a Node Evidence it's not this PR's change (
Questions:
Thanks! |
|
Hi @vw98075 !! 👋 Could you please take a look at the failing checks? I don't believe they are related to the changes in this PR. Check 1 — Check 2 — Could someone re-run the failed checks or confirm whether these are known flaky tests? Thank you! 🙏 |
|
hi @vw98075 !! Could you please take a look at the failing checks? I don't believe they are related to the changes in this PR. |
Generated service classes are meant to be extended (e.g. ExtendedFooService extends FooService), but private fields and helper methods prevent clean subclassing. Switch them to protected so the generated services follow the open/closed principle.
Scope is limited to service classes:
Class-level constants (private static final Logger) are left untouched.
Closes #33715
Please make sure the below checklist is followed for Pull Requests.
Co-authored-by:trailer in the commit(s)When you are still working on the PR, consider converting it to Draft (below reviewers) and adding
skip-cilabel, you can still see CI build result at your branch.