Coder Social home page Coder Social logo

Comments (4)

chibash avatar chibash commented on July 19, 2024

The stack trace seems to show that PowerMock tried to get the return type of asObservable().

from javassist.

cmelchior avatar cmelchior commented on July 19, 2024

Yes, and that is the problem. The return type of asObservable() is a rx.Observable() which isn't available to the class loader.

from javassist.

chibash avatar chibash commented on July 19, 2024

So, if PowerMock requires the return type of asObservable(), Javassist could not fix the problem.
It could be possible to postpone reading a class file but, if PowerMock needs to check its definition, the class file has to be loaded anyway and an exception will be thrown.

from javassist.

cmelchior avatar cmelchior commented on July 19, 2024

Yes, as I wrote in the original post I was also a bit unsure if this is JavaAssists problem. Going over the code again ( https://github.com/jboss-javassist/javassist/blob/master/src/main/javassist/ClassPool.java#L444-Lundefined ) I noticed that NotFoundException is actually a checked exception, which is probably the best JavaAssist can do since any libraries using JavaAssist should then be aware that this issue could occur.

I think you are right, JavaAssist is doing the best it can in this situation and it needs to be handled higher up in the stack. Sorry for the trouble.

from javassist.

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.