2011-12-18

Let's Code Jumi #107: Testing Bytecode Manipulation (Part 1)

I will create a Java agent which does bytecode manipulation to check that non-thread-safe classes (i.e. classes annotated with JSR-305's @NotThreadSafe) are used only from one thread. Unit tests for bytecode manipulation can be written using a custom class loader, which transforms only the bytecode of a selected class, and a bunch of "guinea pig" classes [1] to be used as test data.

[1] See GOOS page 284.

Download as MP4

Episode Archive