We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when using java.lang.Math.pow(2, 2.5) function, get a javassist.CannotCompileException: [source error] pow(int,double) not found in java.lang.Math
The Class Math doesn't contain function pow(int, double), but contains pow(double,double). Does javassist not support reload method?
ClassPool pool = ClassPool.getDefault(); pool.insertClassPath(new ClassClassPath(JavaasistTest.class)); CtClass formulaClass = pool.makeClass("A"); CtClass mapClass; try { mapClass = pool.get("java.util.Map"); } catch (NotFoundException e) { throw new RuntimeException("Map exception"); } CtMethod runMethod = new CtMethod(CtClass.doubleType, "run", new CtClass[]{mapClass}, formulaClass); runMethod.setModifiers(Modifier.PUBLIC); try { String body = "{double s = Math.pow(2, 2.5);return s;}"; runMethod.setBody(body); } catch (CannotCompileException e) { throw new RuntimeException("CannotCompileException1 exception"); }
javassist.CannotCompileException: [source error] pow(int,double) not found in java.lang.Math
The text was updated successfully, but these errors were encountered:
No branches or pull requests
when using java.lang.Math.pow(2, 2.5) function, get a javassist.CannotCompileException: [source error] pow(int,double) not found in java.lang.Math
The Class Math doesn't contain function pow(int, double), but contains pow(double,double).
Does javassist not support reload method?
javassist.CannotCompileException: [source error] pow(int,double) not found in java.lang.Math
The text was updated successfully, but these errors were encountered: