|
14 | 14 | import org.jboss.jandex.AnnotationInstance;
|
15 | 15 | import org.jboss.jandex.ClassInfo;
|
16 | 16 | import org.jboss.jandex.DotName;
|
17 |
| -import org.jboss.jandex.MethodInfo; |
18 |
| -import org.objectweb.asm.MethodVisitor; |
19 |
| -import org.objectweb.asm.Type; |
20 | 17 |
|
21 | 18 | import io.quarkus.arc.deployment.UnremovableBeanBuildItem;
|
22 | 19 | import io.quarkus.arc.deployment.ValidationPhaseBuildItem;
|
|
41 | 38 | import io.quarkus.panache.common.deployment.PanacheMethodCustomizerBuildItem;
|
42 | 39 | import io.quarkus.panache.common.deployment.PanacheRepositoryEnhancer;
|
43 | 40 | import io.quarkus.panache.common.deployment.TypeBundle;
|
44 |
| -import io.smallrye.mutiny.Multi; |
45 |
| -import io.smallrye.mutiny.Uni; |
46 | 41 |
|
47 | 42 | public class HibernateReactivePanacheKotlinProcessor {
|
48 | 43 |
|
49 | 44 | private static final String META_INF_PANACHE_ARCHIVE_MARKER = "META-INF/panache-archive.marker";
|
50 | 45 | private static final DotName DOTNAME_REACTIVE_SESSION = DotName.createSimple(Mutiny.Session.class.getName());
|
51 | 46 | private static final DotName DOTNAME_ID = DotName.createSimple(Id.class.getName());
|
52 |
| - private static final DotName DOTNAME_UNI = DotName.createSimple(Uni.class.getName()); |
53 |
| - private static final DotName DOTNAME_MULTI = DotName.createSimple(Multi.class.getName()); |
54 |
| - private static final String CHECK_RETURN_VALUE_BINARY_NAME = "io/smallrye/common/annotation/CheckReturnValue"; |
55 |
| - private static final String CHECK_RETURN_VALUE_SIGNATURE = "L" + CHECK_RETURN_VALUE_BINARY_NAME + ";"; |
56 | 47 | private static final TypeBundle TYPE_BUNDLE = ReactiveKotlinJpaTypeBundle.BUNDLE;
|
57 | 48 |
|
58 | 49 | @BuildStep
|
@@ -171,17 +162,4 @@ public ValidationPhaseBuildItem.ValidationErrorBuildItem validate(ValidationPhas
|
171 | 162 | }
|
172 | 163 | return null;
|
173 | 164 | }
|
174 |
| - |
175 |
| - @BuildStep |
176 |
| - PanacheMethodCustomizerBuildItem mutinyReturnTypes() { |
177 |
| - return new PanacheMethodCustomizerBuildItem(new PanacheMethodCustomizer() { |
178 |
| - @Override |
179 |
| - public void customize(Type entityClassSignature, MethodInfo method, MethodVisitor mv) { |
180 |
| - DotName returnType = method.returnType().name(); |
181 |
| - if (returnType.equals(DOTNAME_UNI) || returnType.equals(DOTNAME_MULTI)) { |
182 |
| - mv.visitAnnotation(CHECK_RETURN_VALUE_SIGNATURE, true); |
183 |
| - } |
184 |
| - } |
185 |
| - }); |
186 |
| - } |
187 | 165 | }
|
0 commit comments