Closed TheAmg closed 1 month ago
javap -v
the bytecode comes up in output. public java.lang.Object getById(java.lang.Object);
descriptor: (Ljava/lang/Object;)Ljava/lang/Object;
flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC
Code:
stack=2, locals=2, args_size=2
0: aload_0
1: aload_1
2: checkcast #11 // class java/lang/Long
5: invokevirtual #187 // Method getById:(Ljava/lang/Long;)Lorg/unlogged/demo/models/abstraction/PropertyDetails;
8: areturn
LineNumberTable:
line 9: 0
LocalVariableTable:
Start Length Slot Name Signature
0 9 0 this Lorg/unlogged/demo/service/abstractions/PropertyServiceCEImpl;
MethodParameters:
Name Flags
id synthetic
Example of Synthetic injection is here.
This is fixed with PR #112
Describe the bug
2 candidates are generated in the place of 1 if the following curl is invoked with
unlogged-spring-maven-demo
. curl - 1 ("findById")On hitting this, and candidates load there will be 2 candidates for the method
getById
fromPropertyServiceCEImpl
. 1 with the correct return typePropertyDetails
and the other with returnTypeObject
.This behaviour is not seen if the curl for findAll is used (there will only be 1 controller related candidate and 1 service related candidate).
curl - 2 ("findAll")
This might be happening due to CrudService (interface) methods that
PropertyServiceCEImpl
implements. The only distinguishing factor I see is thatfindAll()
has no args andgetById
has an arg (parametrized).Reproduction steps
unlogged-spring-maven-demo
with0.6.2
.https://github.com/unloggedio/unlogged-sdk/assets/68552461/bfb16073-38e8-4a6f-bf28-d39024aa195c
Expected behavior
For only the candidate with the correct return type to be shown.
Additional context
No response