forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Qute - fix validation of type-safe message expressions
- NPE is currently thrown if a type-safe message expression references a parent expression via hint - resolves quarkusio#16590
- Loading branch information
Showing
4 changed files
with
47 additions
and
4 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
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
27 changes: 27 additions & 0 deletions
27
...ployment/src/main/java/io/quarkus/qute/deployment/TemplateExpressionMatchesBuildItem.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,27 @@ | ||
package io.quarkus.qute.deployment; | ||
|
||
import java.util.Map; | ||
|
||
import io.quarkus.builder.item.MultiBuildItem; | ||
import io.quarkus.qute.deployment.QuteProcessor.Match; | ||
|
||
final class TemplateExpressionMatchesBuildItem extends MultiBuildItem { | ||
|
||
final String templateGeneratedId; | ||
|
||
private final Map<Integer, Match> generatedIdsToMatches; | ||
|
||
public TemplateExpressionMatchesBuildItem(String templateGeneratedId, Map<Integer, Match> generatedIdsToMatches) { | ||
this.templateGeneratedId = templateGeneratedId; | ||
this.generatedIdsToMatches = generatedIdsToMatches; | ||
} | ||
|
||
Match getMatch(Integer generatedId) { | ||
return generatedIdsToMatches.get(generatedId); | ||
} | ||
|
||
Map<Integer, Match> getGeneratedIdsToMatches() { | ||
return generatedIdsToMatches; | ||
} | ||
|
||
} |
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