-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14217 from mkouba/issue-13716
Fix reflective access warning in Qute
- Loading branch information
Showing
2 changed files
with
54 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
independent-projects/qute/core/src/test/java/io/quarkus/qute/ReflectionResolverTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package io.quarkus.qute; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
import java.util.Map; | ||
import java.util.TreeMap; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class ReflectionResolverTest { | ||
|
||
@Test | ||
public void testReflectionResolver() { | ||
Map<Integer, String> treeMap = new TreeMap<>(Integer::compare); | ||
treeMap.put(2, "bar"); | ||
treeMap.put(1, "foo"); | ||
assertEquals("foo", Engine.builder().addDefaults().addValueResolver(new ReflectionValueResolver()).build() | ||
.parse("{map.entrySet.iterator.next.value}").data("map", treeMap).render()); | ||
} | ||
|
||
} |