Skip to content

Conversation

@oswetto
Copy link
Contributor

@oswetto oswetto commented Oct 30, 2023

Add missing class name
Add missing method name
Add missing inheritDoc
Add final modifier
Repalce import Stack with Deque

Add missing class name
Add missing method name
Add missing inheritDoc
Add final modifier
Repalce import Stack with Deque
@rbri
Copy link
Member

rbri commented Oct 31, 2023

Hi @oswetto,

thanks for the PR, looks good.
Can you please fix the remaining checkstyle issues ....

image

And maybe you can provide a short hint why you have replaced the Stack with Deque

Thanks, Ronald

@oswetto
Copy link
Contributor Author

oswetto commented Nov 1, 2023

Hello @rbri errors are fixed.

Oracle suggest repalce Stack with Deque

The Stack class extends class Vector. with five operations that allow a vector to be treated as a stack. The usual push and pop operations are provided, as well as a method to peek at the top item on the stack, a method to test for whether the stack is empty, and a method to search the stack for an item and discover how far it is from the top.
When a stack is first created, it contains no items.

A more complete and consistent set of LIFO stack operations is provided by the Deque interface and its implementations, which should be used in preference to this class.

https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Stack.html

@rbri rbri merged commit e3f97b4 into HtmlUnit:master Nov 1, 2023
@rbri
Copy link
Member

rbri commented Nov 1, 2023

Thanks!

rbri added a commit that referenced this pull request Nov 2, 2023
…ack - this hack was broken during the switch from Stack to Deque (see #45)
rbri added a commit that referenced this pull request Nov 2, 2023
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