Skip to content

Commit

Permalink
ArC extension - change the way build profile/property beans are disabled
Browse files Browse the repository at this point in the history
- remove the Produces annotation instead of making it an alternative
  • Loading branch information
mkouba committed May 31, 2021
1 parent d21a3b1 commit 418b9d0
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,15 @@ private void transformBean(AnnotationTarget target, TransformationContext ctx, b
// Veto the class
transform.add(DotNames.VETOED);
} else {
// Add @Alternative to the producer
transform.add(DotNames.ALTERNATIVE);
// Remove @Produces from the producer field/method
transform.remove(this::isProducer);
}
transform.done();
}
}

private boolean isProducer(AnnotationInstance annotationInstance) {
return annotationInstance.name().equals(DotNames.PRODUCES);
}

}

0 comments on commit 418b9d0

Please sign in to comment.