Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

review: refactor(SpoonifierVisitor): Deque should be used instead of Stack #5374

Merged

Conversation

tenax66
Copy link
Contributor

@tenax66 tenax66 commented Jul 31, 2023

Unless there's particular reason, Deque should be used instead of Stack (like other part of spoon code).

@sonatype-lift
Copy link
Contributor

sonatype-lift bot commented Jul 31, 2023

Sonatype Lift is retiring

Sonatype Lift will be retiring on Sep 12, 2023, with its analysis stopping on Aug 12, 2023. We understand that this news may come as a disappointment, and Sonatype is committed to helping you transition off it seamlessly. If you’d like to retain your data, please export your issues from the web console.
We are extremely grateful and thank you for your support over the years.

📖 Read about the impacts and timeline

@tenax66 tenax66 changed the title refactor(): Deque should be used instead of Stack refactor(SpoonifierVisitor): Deque should be used instead of Stack Jul 31, 2023
@tenax66
Copy link
Contributor Author

tenax66 commented Jul 31, 2023

After class replacement, several tests failed due to peek() of Deque may return null instead of throwing an Exception.
So I replaced peek() with getFirst(), which is said to be equivalent to peek() of Stack in Javadoc of Deque.

@tenax66 tenax66 changed the title refactor(SpoonifierVisitor): Deque should be used instead of Stack review: refactor(SpoonifierVisitor): Deque should be used instead of Stack Jul 31, 2023
Copy link
Collaborator

@SirYwell SirYwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, will merge.

@SirYwell SirYwell merged commit f60b801 into INRIA:master Aug 3, 2023
@SirYwell
Copy link
Collaborator

SirYwell commented Aug 3, 2023

Thanks!

@tenax66 tenax66 deleted the refactor/SpoonifierVisitor-using-deque branch August 3, 2023 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants