Skip to content

Commit

Permalink
Merge pull request #110 from jfdenise/main
Browse files Browse the repository at this point in the history
Fix for Issue #107, org.wildfly.rule.annotated.type ruke should be set multiple time in the same layer
  • Loading branch information
jfdenise authored Jan 15, 2025
2 parents dcf644b + 64d38fe commit d7106d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/src/main/java/org/wildfly/glow/LayerMetadata.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public abstract class LayerMetadata {
FULLY_NAMED_RULES.add(ADD_ON_DEPENDS_ON);
FULLY_NAMED_RULES.add(ADD_ON_DESCRIPTION);

FULLY_NAMED_RULES.add(ANNOTATED_TYPE);
FULLY_NAMED_RULES.add(ANNOTATIONS);
FULLY_NAMED_RULES.add(BRING_DATASOURCE);
FULLY_NAMED_RULES.add(CLASS);
Expand All @@ -71,6 +70,7 @@ public abstract class LayerMetadata {

RULES_WITH_SUFFIX.add(ADD_ON_FIX);
RULES_WITH_SUFFIX.add(ANNOTATION_FIELD_VALUE);
RULES_WITH_SUFFIX.add(ANNOTATED_TYPE);
RULES_WITH_SUFFIX.add(EXPECTED_FILE);
RULES_WITH_SUFFIX.add(NOT_EXPECTED_FILE);
RULES_WITH_SUFFIX.add(PROFILE);
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/wildfly/glow/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ public static LayerMapping buildMapping(Map<String, Layer> layers, Set<String> p
}
continue;
}
if (LayerMetadata.ANNOTATED_TYPE.equals(k)) {
if (k.startsWith(LayerMetadata.ANNOTATED_TYPE)) {
String val = l.getProperties().get(k);
AnnotatedType type = parseAnnotatedType(val, l);
Map<String, List<AnnotatedType>> annotations = mapping.getAnnotatedTypes().computeIfAbsent(type.getAnnotation(), value -> new HashMap<>());
Expand Down

0 comments on commit d7106d6

Please sign in to comment.