vasiliygagin/cucumber-jvm — comment on commit e5e6153154c21f1f73d741db6fc46d2d6f436b5d
File: java/src/main/java/cucumber/runtime/java/ClasspathMethodScanner.java line 27
By vasiliygagin:

This check is for non-static inner classes. Since you need a reference to parent class to instantiate them, there is a decision to be made.Shell we try to instantiate parent first, then discovered class. This seems to be messy. Other option is completely ignore the class. I've chosen to instantiate super class. Some of test cases from spring module were using anonymous inner classes, which were extending top level annotated class. Pre-fix behavior would have instantiated them. This approach is most compatible with existing code.

While is there for cases when inner class extends inner class which extends top level class.

As to isInstantiable, I see the value of adding it as third check. Would you agree?