Skip to content

Commit

Permalink
Primitive types do not get shaded anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
EricWittmann committed Jan 8, 2025
1 parent 5f78fce commit 402cdf6
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ protected void doProcess() {
* out into a shared Trait.
*/
private boolean isPropertyShaded(Property property, EntityModel entityModel) {
if (isPrimitiveType(property)) {
return false;
}
Collection<TraitModel> traits = entityModel.getTraits();
if (traits != null) {
for (TraitModel trait : traits) {
Expand All @@ -94,4 +97,10 @@ private boolean isPropertyShaded(Property property, EntityModel entityModel) {
}
return false;
}

private boolean isPrimitiveType(Property property) {
String type = property.getType();
PropertyType propertyType = PropertyType.parse(type);
return propertyType != null && propertyType.isPrimitiveType();
}
}

0 comments on commit 402cdf6

Please sign in to comment.