gizmo icon indicating copy to clipboard operation
gizmo copied to clipboard

checker for returnValue and contructor super call and auto add

Open dufoli opened this issue 4 years ago • 3 comments

fix #67 fix #65

dufoli avatar Dec 19 '20 10:12 dufoli

Hello, code is ready with PR. I have just a doubt about impact of the classCreator close.

https://github.com/quarkusio/gizmo/blob/bda4d0794f8b808c095c1351ba6bc48f92f50403/src/main/java/io/quarkus/gizmo/BytecodeCreatorImpl.java#L987 Else it is mostly store and load return handle so no impact because it call visitor ...

dufoli avatar Dec 20 '20 11:12 dufoli

I ma thinking to split isValid to isMissingReturnValue and isMissingSuper or this call in ctor. To auto add call to object one by default:

            ctor.invokeSpecialMethod(
                    MethodDescriptor.ofConstructor("java.lang.Object"),
                    ctor.getThis());

wdyt ?

dufoli avatar Dec 20 '20 11:12 dufoli

@gsmet @stuartwdouglas @Sanne can you review it ?

dufoli avatar Jan 11 '21 17:01 dufoli