From ec8be4dc3e1d720804d2099fbec2bb71c5ca27db Mon Sep 17 00:00:00 2001 From: Ladislav Thon Date: Tue, 7 Dec 2021 16:33:40 +0100 Subject: [PATCH] Specify treatment of invalid @Enhancement and @Registration --- .../enterprise/inject/build/compatible/spi/Enhancement.java | 3 +++ .../enterprise/inject/build/compatible/spi/Registration.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/api/src/main/java/jakarta/enterprise/inject/build/compatible/spi/Enhancement.java b/api/src/main/java/jakarta/enterprise/inject/build/compatible/spi/Enhancement.java index 35cee264..6a3d6438 100644 --- a/api/src/main/java/jakarta/enterprise/inject/build/compatible/spi/Enhancement.java +++ b/api/src/main/java/jakarta/enterprise/inject/build/compatible/spi/Enhancement.java @@ -33,6 +33,9 @@ * the method is called once for each field that is declared on each discovered type, as defined * in {@link jakarta.enterprise.lang.model.declarations.ClassInfo#fields() ClassInfo.fields}. *

+ * If the {@code @Enhancement} method doesn't declare any parameter of one of these types, + * or if it declares more than one, the container treats it as a deployment problem. + *

* Additionally, methods annotated {@code @Enhancement} may declare parameters of these types: *