Instead of considering things from jars to be reloadable if
they are in the same package as subtypes that are also reloadable
it is better to just make the test (isTopmostReloadable()) smarter.
This test determines which reloadable type is the highest in
the hierarchy and gets extra state added to it. With a 'dumb test'
it was assuming further parents were reloadable because they
were in the same package as the subtype. Now it does a more
costly, more precise check.
The original solution had problems because if you made some classes
from a jar reloadable, that confused handled of other subclasses
of those types in other jars (that did not share the same package
name so would not have been made reloadable).
This area of the code to do with a bit of a smack with a
refactoring hammer to streamline it.
- if you force an inclusion via 'inclusions=foo..*' then
allow for everything in that package to be made reloadable
regardless of it coming from jar or disk.
- when inclusion patterns don't match fall back on regular
acceptance mechanisms (like package cache, etc) rather
than just dismissing it.
- the results of decision making around making things
reloadable are now enums/objects rather than plain booleans
so that later we can do further analysis on those
decisions.
Issue: https://github.com/grails/grails-core/issues/8817
This ASM has a different visitMethodInsn() instruction so
there are big changes throughout the code. The tests are running
fine but as new testcases are added related to Java8 we may need
further fixes to take account of the extra isInterface parameter
on visitMethodInsn()
- Split the AspectJ testcode out of the general testdata project.
- Adjusted tests to handle that JDT produces different code to AspectJ.
- Modified some tests to work better with javac compiled testdata (which
is what happens when building on the command line or build machine)