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

Qute - fix default template extensions for java.util.Map #6519

Closed
mkouba opened this issue Jan 13, 2020 · 1 comment · Fixed by #6675
Closed

Qute - fix default template extensions for java.util.Map #6519

mkouba opened this issue Jan 13, 2020 · 1 comment · Fixed by #6675
Assignees
Labels
area/qute The template engine kind/bug Something isn't working
Milestone

Comments

@mkouba
Copy link
Contributor

mkouba commented Jan 13, 2020

Map.get() and Map.containsKey() are not handled correctly. A workaround exists:

@TemplateExtension
static Object get(Map<?, ?> map, Object key) {
   return map.get(key);
 }
 @TemplateExtension
 static boolean containsKey(Map<?, ?> map, Object key) {
    return map.containsKey(key);
 }
@mkouba mkouba added kind/bug Something isn't working area/qute The template engine labels Jan 13, 2020
@mkouba mkouba added this to the 1.2.0 milestone Jan 13, 2020
@dasniko
Copy link

dasniko commented Jan 14, 2020

Thanks, the workaround works like a charm.
I wasn't aware of the second param option. 👍

@gsmet gsmet removed this from the 1.2.0 milestone Jan 20, 2020
@mkouba mkouba self-assigned this Jan 21, 2020
@mkouba mkouba added this to the 1.2.0.Final milestone Jan 21, 2020
mkouba added a commit to mkouba/quarkus that referenced this issue Jan 21, 2020
mkouba added a commit to mkouba/quarkus that referenced this issue Jan 21, 2020
mkouba added a commit to mkouba/quarkus that referenced this issue Jan 21, 2020
gsmet pushed a commit to mkouba/quarkus that referenced this issue Jan 21, 2020
gsmet pushed a commit that referenced this issue Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/qute The template engine kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants