Forum Stats

  • 3,750,548 Users
  • 2,250,192 Discussions
  • 7,867,003 Comments

Discussions

jdk Instrumentation.retransformClasses(Class) drop MethodParameters attribute

2643695
2643695 Member Posts: 3
edited Mar 7, 2020 7:07PM in Java Runtime Environment (JRE)

jdk Instrumentation.retransformClasses(Class) drop MethodParameters attribute which existed in the original class file. at least 8u202 and 8u241 do the same thing, it cause Mybatis cannot get correct names of the paramters which not set ''@Param'' annotation in a ''@Mapper' interface's multiple parameter method, if running with a  javaagent  which retransforms all user classes. for example, JMockit, a coverage test tool.