GithubHelp home page GithubHelp logo

Comments (4)

raphw avatar raphw commented on July 19, 2024

I am currently on vacation, but I will look at it first time I am back. First suspicion: Byte Buddy is not currently configured to keep a reference to the generated class'es byte code after it is first loaded. Try the manifest version of the wrapper strategy. I guess, power mock requires explicit access to the byte code!

from byte-buddy.

raphw avatar raphw commented on July 19, 2024

I had a look at it. The error lies with Power Mock, in my opinion. During class loading, Byte Buddy's class loader is queried for the super class of the runtime generated class SampleClass. This is standard class loader behaviour and cannot be changed.

This class is however not longer available. The error breaks down to:

@Test
public void testFoo() throws Exception {
  sample.getClass().getClassLoader().loadClass(sample.getClass().getName());
}

what causes the same error, even without using Byte Buddy. From PowerMock's MockClassLoader I can see that there are loading exceptions for specific libraries, like e.g. cglib or javassist to presumeable prevent the same problem. The would need to include Byte Buddy in this list, I assume.

from byte-buddy.

juherr avatar juherr commented on July 19, 2024

On my side, I succeed to remove my dependency to PowerMock. So no more problem :)

Do you want I open a issue on PowerMock, or you take the point?

from byte-buddy.

raphw avatar raphw commented on July 19, 2024

If you have the minutes, please report it to PowerMock. I am still officially on vacation, I can alternatively do it afterwards.

from byte-buddy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.