wu-sheng commented on issue #3152: Set up the bootstrap instrumentation plugin framework URL: https://github.com/apache/skywalking/pull/3152#issuecomment-514616127 > I have tested in bootstrap class and 3rd part class,both work well. I have a question,the classes in HIGH_PRIORITY_CLASSES still will be loaded by two classloader,right? but I debug found, eg.EnhancedInstance is loaded by bootstrap classloader in bootstrap interceptor (generated by InstanceMethodInterTemplate),and in normal InstMethodsInter it is loaded by application classloader .is it right? I think EnhancedInstance will be find in bootstrap classloader first . You do the tests quickly :) Thanks. To your question, from my understanding, when bootstrap instrumentation actived, EnhancedInstance should only be loaded in Bootstrap classloader. Otherwise, you will face `Class Cast Exception`, because you can't cat Bootstrap's EnhancedInstance to ApplicationClassLoader's EnhancedInstance. Load the generated class to class loader w/o initialization should be safe. That is why I use `#injectRaw` rather than `#inject`. This is my guess and understanding from test results, I used to try `#inject`, which cause that cast exception. :)
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services