javassist icon indicating copy to clipboard operation
javassist copied to clipboard

Java bytecode engineering toolkit

Results 142 javassist issues
Sort by recently updated
recently updated
newest added

Execution failed for input:~/.gradle/caches/transforms-3/3b7991cb6e076dfa70fd595a6f00b3b8/transformed/jetified-kotlin-stdlib-jdk8-1.4.31.jar at java_lang_Throwable$fillInStackTrace.call(Unknown Source) at com.mockuai.plugin.mkaop.MkAssistTransform.transform(MkAssistTransform.groovy:95) at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:284) at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:69) ... 124 more Caused by: java.lang.RuntimeException: cannot find META-INF.versions.9.module-info: module-info found in META-INF/versions/9/module-info.class at javassist.CtClassType.getClassFile3(CtClassType.java:226) at javassist.CtClassType.getClassFile2(CtClassType.java:178)...

I have created a simple program to extract class details from java programs. But, I need to get all the details of a particular class field with Javassist. The followings...

Seams method [javassist.bytecode.AnnotationsAttribute#addAnnotation](https://github.com/jboss-javassist/javassist/blob/master/src/main/javassist/bytecode/AnnotationsAttribute.java#L216) does not properly handle annotations having type [@Repeatable](https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Repeatable.html). It replaces already added annotation (exactly like JavaDoc states). Need to improve handling for [@Repeatable](https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Repeatable.html) type annotations, ones like...

The following line gives a problem: ```java " java.lang.reflect.Method m = cls.getDeclaredMethod(\"bananas\");", ``` > javassist.CannotCompileException: [source error] getDeclaredMethod(java.lang.String) not found in java.lang.Class Here the full error: ``` javassist.CannotCompileException: [source error]...

I'm creating classes and injecting method invocations to those newly created classes. The procedure is simple and works for classes with relatively shallow package depths. Today, I've encountered a problematic...

I create an method a like: int a () { return 1; } then i instrument taegetMethod: taegetMethod.addLocalVariable("id", classPool.get("java.lang.Integer")); existsMethod.insertBefore("id=a();"); No error is printed and the progam hangs forever.

``` package com.company; import javassist.ClassPool; import javassist.CtClass; import javassist.CtMethod; public class Main { public static class Foo { public void baz(String o) { System.out.println("ok"); } } public static class Bar...

When I use javassist to getRefClasses, I got the exception below: ```cmd java.lang.RuntimeException: cannot find META-INF.versions.9.kotlin.reflect.jvm.internal.impl.serialization.deserialization.builtins.BuiltInsResourceLoader: kotlin.reflect.jvm.internal.impl.serialization.deserialization.b uiltins.BuiltInsResourceLoader found in META-INF/versions/9/kotlin/reflect/jvm/internal/impl/serialization/deserialization/builtins/BuiltInsResourceLoader.class at javassist.CtClassType.getClassFile3(CtClassType.java:213) at javassist.CtClassType.getClassFile2(CtClassType.java:178) at javassist.CtClass.getRefClasses(CtClass.java:528) at neu.lab.conflict.container.AllRefedCls.(AllRefedCls.java:32) at...

**## insert following code before a method:** try {com.baidu.openrasp.ModuleLoader.loadClass("com.baidu.openrasp.HookHandler").getMethod("onInputStreamRead",new Class[]{java.lang.int.class,Object.class}).invoke(null,new Object[]{$_,$0});} catch (Exception e) {if(e.getClass().getName().equals("com.baidu.openrasp.exception.SecurityException")){throw e;}} **## The following error occurred at runtime:** java.lang.VerifyError: Bad type on operand stack Exception...

kotlin code ![image](https://user-images.githubusercontent.com/3140791/128299454-077bd885-8b64-48d1-b2d6-ea5b0f260ec8.png) bytecode class ![image](https://user-images.githubusercontent.com/3140791/128300067-8c96089c-f982-4f9d-aad3-976abfcdacb5.png) jd-gui ![image](https://user-images.githubusercontent.com/3140791/128289430-b2bdc437-ee80-4e63-8f6e-cce3ca390d6c.png) CtMethd.setbody ![image](https://user-images.githubusercontent.com/3140791/128289678-c6edb276-c847-4917-a01e-94aebbd5f4e0.png) source parse ![image](https://user-images.githubusercontent.com/3140791/128289840-9429982f-f6c7-43fb-b4ab-c61f1deab957.png)