sevntu-checkstyle / methods-distance

GNU Lesser General Public License v3.0
5 stars 13 forks source link

Fix issue #55 #56

Closed wilcoln closed 4 years ago

wilcoln commented 4 years ago

Resolve #55

I would like to mention that the isAnonymousClassDef method is already defined in RequireThisCheck (Cf checkstyle main repo), as you might recall, I'm working on refactoring this check in order to extract reusable logic to utility classes like TokenUtil and a new FrameUtil. (See https://github.com/checkstyle/checkstyle/issues/8126 for more details). As for the method isAnonymousClassDef, I'm planning to place it inside TokenUtil.

Once it's done, line 47 of AnalysisUtils.java will become

result = !TokenUtil.isAnonymousClassDef(parent);