2011-12-30

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

The tests are in place, so it's possible to write the actual bytecode transformations. ASM's user guide is a good reference for learning Java bytecode.

Download as MP4

Episode Archive

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

2011-12-09

Let's Code Jumi #103: Parameterized Tests (Part 1)

We need to create a new module for a Java agent, so now that we touch the build tests, it's a good idea to refactor them into parameterized tests. That should make them more maintainable. That will also allow me to write tests for the test data, to make sure that all of the artifacts follow some project principles.

Download as MP4

Episode Archive