java-design-patterns
java-design-patterns copied to clipboard
fix issue 1968 and correct visitor pattern code and test.
This PR helps for solving #1968
fix issue 1968 and correct visitor pattern code
Modified issue with visitor mode code, changed different method name to method reload, fixed issue1968.
Pull request description
The main modification of the method in the class is visit, which is accessed only by different parameter types, eliminating some errors and simplifying code writing, in line with the pattern requirements.
Hi @xyllq999 please keep in mind that the README code needs to be updated as well
Many thanks for implementing this improvement @xyllq999! Kudos to @yonatankarp for raising the issue and providing review help.
@all-contributors please add @xyllq999 for code
@all-contributors please add @yonatankarp for review
@iluwatar
@yonatankarp already contributed before to review