soot-oss / soot

Soot - A Java optimization framework
GNU Lesser General Public License v2.1
2.84k stars 708 forks source link

VisibilityParameterAnnotationTag not picking up Elements correctly #2057

Open lbettels opened 4 months ago

lbettels commented 4 months ago

When running Soot with the jap pack, it manages to find all the correct Annotations, but it fails in some instances to correctly determine the elements belonging to that tag.

My specific case is:

    @PostMapping("/checkIn")
    @Transactional
    public String checkIn(@ModelAttribute RoomVisit.Data visitData, Model model){
        ...;
    }

When I analyze the method and retrieve the VisibilityParameterAnnotationTag, the @ModelAttribute correctly shows up, but visitData is not in the elems field.

Screenshot from 2024-03-12 11-36-23

The information of the Annotation also didn't get lost while compiling, as the command javap -c -v correctly shows the Annotation only for parameter 0.

Screenshot from 2024-03-12 11-41-36

Here is the compiled class file: RoomController.zip

I am currently using the newest build of Soot and Java 17.

Any help would be greatly appreciated. Cheers!