The code，following the line " new ClassReader(classfileBuffer)" is unreachable : I want to add monitor code into some class,so i use the java agent and asm4 to manipulate the byte code.
The core code as followed:

    public class MyClassFileTransformer implements ClassFileTransformer {

	@Override
	public byte[] transform(ClassLoader loader, String className,
			Class<?> classBeingRedefined, ProtectionDomain protectionDomain,
			byte[] classfileBuffer) throws IllegalClassFormatException {

		if (className.startsWith("com/dgl/asm/SleepClass")) {
			
	        ClassReader reader = new ClassReader(classfileBuffer);
	        System.out.println("1231231231312");
			ClassWriter cw = new ClassWriter(reader,0);
			ClassVisitor adpter = new AddTimerClassAdpter(Opcodes.ASM4, cw);	
			reader.accept(adpter, 0);
			return cw.toByteArray();
		}
		return classfileBuffer;
	}

}

However,the code ,after "ClassReader reader = new ClassReader(classfileBuffer)",is always unreachable.After the "new ClassReader(classfileBuffer)" be executed,the program jumps to the main method directly without any exception!

what should I do? Any idea? 

 