Ishaan29 opened a new pull request, #3987:
URL: https://github.com/apache/eventmesh/pull/3987
<!--
### Contribution Checklist
- Name the pull request in the form "[ISSUE #XXXX] Title of the pull
request",
where *XXXX* should be replaced by the actual issue number.
Skip *[ISSUE #XXXX]* if there is no associated github issue for this
pull request.
- Fill out the template below to describe the changes contributed by the
pull request.
That will give reviewers the context they need to do the review.
- Each pull request should address only one issue.
Please do not mix up code from multiple issues.
- Each commit in the pull request should have a meaningful commit message.
- Once all items of the checklist are addressed, remove the above text and
this checklist,
leaving only the filled out template below.
(The sections below can be removed for hotfixes of typos)
-->
<!--
(If this PR fixes a GitHub issue, please add `Fixes #<XXX>` or `Closes
#<XXX>`.)
-->
Fixes #3827 .
### Motivation
the issue explains
a. Public class variable fields do not respect the encapsulation principle
and has three main disadvantages:
Additional behavior such as validation cannot be added.
The internal representation is exposed, and cannot be changed afterwards.
Member values are subject to change from anywhere in the code and may not
meet the programmer’s assumptions.
By using private attributes and accessor methods (set and get), unauthorized
modifications are prevented.
b. Overriding or shadowing a variable declared in an outer scope can
strongly impact the readability, and therefore the maintainability, of a piece
of code. Further, it could lead maintainers to introduce bugs because they
think they’re using one variable but are really using another.
### Modifications
- Changed Access modifier of `items[]`
- Added getters for the same
- Changed Breaking tests
- Renamed Method scoped to `reentrantLock`
### Documentation
- Does this pull request introduce a new feature? (yes / no) no
- If yes, how is the feature documented? (not applicable / docs / JavaDocs /
not documented)
- If a feature is not applicable for documentation, explain why? Refactoring
and Optimization
- If a feature is not documented yet in this PR, please create a followup
issue for adding the documentation
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]