In contrast, I've ported an application from 1.3 to 1.4 (thousands of lines) that needed no changes at all.
When porting it to 1.5 later I only had to change a single variable name in a single class (someone had called something "enum" which is now a reserved
word.
Well written code should work on higher level JVMs with no change once compiled.
Exploiting bugs is of course NOT what well written code does as doing so means reliance on non-documented behaviour (in fact that code would run on for example 1.3.0_04 but not on 1.3.0_05 or 1.3.1_02, not good).
Workarounds for bugs should still work in higher level JVMs unless they exploit the bug itself (by doing something to the buggy result) rather than replacing the buggy code with something else.