Skip to content

Stop using LinkedList in TrieParser and most of our tests #2394

Open
@cpovirk

Description

I just noticed that we use it in TrieParser -- particularly egregious because IIRC that code exists largely to help on GWT, where I would assume LinkedList is even more terrible.

We might not be using it anywhere else (in public Guava, at least), except:

  • in tests (which we might as well also fix)
  • in GWT *TreeTraverser (and I forget what the situation is with GWT... we could probably roll our own ArrayDeque there, but probably we shouldn't bother)

For a time, Java 5 / Froyo compatibility kept us from using ArrayDeque. But now we can use it, and we should. (But we probably should never have used LinkedList, anyway. For example, TrieParser could probably use ArrayList if it were written to modify the end of the list instead of the beginning.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions