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

Better way to handle filter references #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Pablete1234
Copy link
Member

Old system would not work with something like:

<all id="all-filter">
   <filter id="walking"/>
   <filter id="crouching"/>
</all>
<walking id="walking"/>
<crouching id="crouching"/>

because the top 2 filter references were searching 2 filters that didn't exist yet.
With the new system, 2 "filter reference" objects would be created, and when all filters loaded, the references would be searched, if not found, errors will be added.

@@ -114,6 +118,7 @@ public FilterModule() {
@Override
public boolean loadMatch(@NonNull Match match) {
filters.put(match, Maps.newHashMap());
references.put(match, new ArrayList<>());
Copy link
Member

Choose a reason for hiding this comment

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

We've been using Lists.newArrayList() generally

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