@@ -38,6 +38,9 @@ private Map<String, JApiClass> buildClassMap(List<JApiClass> classes) {
3838 }
3939
4040 private void evaluateBinaryCompatibility (JApiClass jApiClass , Map <String , JApiClass > classMap ) {
41+ if (jApiClass .getAccessModifier ().hasChangedTo (AccessModifier .PUBLIC )) {
42+ return ; // class appears as "new" public class
43+ }
4144 if (jApiClass .getChangeStatus () == JApiChangeStatus .REMOVED ) {
4245 addCompatibilityChange (jApiClass , JApiCompatibilityChange .CLASS_REMOVED );
4346 } else if (jApiClass .getChangeStatus () == JApiChangeStatus .MODIFIED ) {
@@ -583,11 +586,11 @@ public JApiMethod callback(JApiClass implementedInterface, Map<String, JApiClass
583586 }
584587
585588 private boolean isAbstract (JApiHasAbstractModifier jApiHasAbstractModifier ) {
586- boolean isAbstract = false ;
587- if ( jApiHasAbstractModifier .getAbstractModifier ().hasChangedTo ( AbstractModifier . ABSTRACT )) {
588- isAbstract = true ;
589+ if ( jApiHasAbstractModifier . getAbstractModifier (). getNewModifier (). isPresent ()) {
590+ AbstractModifier abstractModifier = jApiHasAbstractModifier .getAbstractModifier ().getNewModifier (). get ();
591+ return abstractModifier == AbstractModifier . ABSTRACT ;
589592 }
590- return isAbstract ;
593+ return false ;
591594 }
592595
593596 private void checkIfExceptionIsNowChecked (JApiBehavior behavior ) {
@@ -840,14 +843,6 @@ public JApiSuperclass callback(JApiClass clazz, Map<String, JApiClass> classMap,
840843 checkIfAbstractMethodAdded (jApiClass , classMap );
841844 }
842845
843- private boolean isAbstract (JApiMethod jApiMethod ) {
844- if (jApiMethod .getAbstractModifier ().getNewModifier ().isPresent ()) {
845- AbstractModifier abstractModifier = jApiMethod .getAbstractModifier ().getNewModifier ().get ();
846- return abstractModifier == AbstractModifier .ABSTRACT ;
847- }
848- return false ;
849- }
850-
851846 private boolean hasSameType (JApiField field , JApiField otherField ) {
852847 boolean hasSameNewType = false ;
853848 if (field .getType ().getNewTypeOptional ().isPresent () && otherField .getType ().getNewTypeOptional ().isPresent ()) {
0 commit comments