Code Monkey home page Code Monkey logo

Comments (6)

mkouba avatar mkouba commented on June 30, 2024

Maybe we should also add a check whether a constPoolSize exceeds the limit?

from jboss-classfilewriter.

mkouba avatar mkouba commented on June 30, 2024

That was quick, thanks! ;-)

from jboss-classfilewriter.

stuartwdouglas avatar stuartwdouglas commented on June 30, 2024

Do you need a release with this?

from jboss-classfilewriter.

mkouba avatar mkouba commented on June 30, 2024

It seems org.jboss.classfilewriter.code.CodeAttribute.writeShort(int) should probably only fail if n > Short.MAX_VALUE * 2.

By the way, b2eb9f0 breaks weld on few places. org.jboss.classfilewriter.code.CodeAttribute.anewarray(String) previously accepted a class name, e.g. java.lang.Class. Now it fails with:

Caused by: java.lang.RuntimeException: invalid descriptor [Ljava.lang.Class;
    at org.jboss.classfilewriter.code.StackEntry.<init>(StackEntry.java:68)
    at org.jboss.classfilewriter.code.StackEntry.of(StackEntry.java:115)
    at org.jboss.classfilewriter.code.StackState.push(StackState.java:93)
    at org.jboss.classfilewriter.code.StackFrame.replace(StackFrame.java:138)
    at org.jboss.classfilewriter.code.CodeAttribute.anewarray(CodeAttribute.java:233)

from jboss-classfilewriter.

mkouba avatar mkouba commented on June 30, 2024

The same applies to org.jboss.classfilewriter.code.CodeAttribute.exceptionBlockStart(String) and maybe other methods...

A simple fix is to do type.replace('.', '/') on a param but it might deserve a more systematic approach :-).

from jboss-classfilewriter.

mkouba avatar mkouba commented on June 30, 2024

@stuartwdouglas Thanks again :-)

from jboss-classfilewriter.

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.