@@ -382,22 +382,23 @@ public Integer callback(JApiClass superclass, Map<String, JApiClass> classMap, J
382
382
}
383
383
if (isNotPrivate (method ) && method .getChangeStatus () == JApiChangeStatus .REMOVED ) {
384
384
List <Integer > returnValues = new ArrayList <>();
385
- forAllSuperclasses (jApiClass , classMap , returnValues , new OnSuperclassCallback < Integer >() {
386
- @ Override
387
- public Integer callback ( JApiClass superclass , Map < String , JApiClass > classMap , JApiChangeStatus changeStatusOfSuperclass ) {
388
- for ( JApiMethod superMethod : superclass . getMethods ()) {
389
- if ( areMatching ( superMethod , method )) {
390
- if ( method .getFinalModifier ().getOldModifier ().get () == FinalModifier . NON_FINAL
391
- && superMethod .getFinalModifier ().getNewModifier ().get () == FinalModifier .FINAL ) {
392
- return 1 ;
393
- }
385
+ forAllSuperclasses (jApiClass , classMap , returnValues , ( superclass , classMap1 , changeStatusOfSuperclass ) -> {
386
+ for ( JApiMethod superMethod : superclass . getMethods ()) {
387
+ if ( areMatching ( superMethod , method ) ) {
388
+ if ( method . getFinalModifier (). getOldModifier (). isPresent ()
389
+ && method . getFinalModifier (). getOldModifier (). get () == FinalModifier . NON_FINAL
390
+ && superMethod .getFinalModifier ().getNewModifier ().isPresent ()
391
+ && superMethod .getFinalModifier ().getNewModifier ().get () == FinalModifier .FINAL ) {
392
+ addCompatibilityChange ( superMethod , JApiCompatibilityChange . METHOD_NOW_FINAL ) ;
393
+ return 1 ;
394
394
}
395
395
}
396
- return 0 ;
397
396
}
397
+ return 0 ;
398
398
});
399
399
if (returnValues .stream ().anyMatch (value -> value == 1 )) {
400
400
addCompatibilityChange (method , JApiCompatibilityChange .METHOD_NOW_FINAL );
401
+ addCompatibilityChange (method , JApiCompatibilityChange .METHOD_MOVED_TO_SUPERCLASS );
401
402
}
402
403
}
403
404
// section 13.4.18 of "Java Language Specification" SE7
0 commit comments