Maracas Analyzing the impact of libraries evolution

Method Added to Interface

A new method is added to an interface.


Example

The interface Vehicle in the library project adds the method getColor().

public interface Vehicle {
  String getType();
+  String getColor();

}

Broken Uses

Hereafter, we list the broken uses that are currently detected by Maracas.


1. Concrete classes implementing the modified interface

Example

The concrete Bus class in a client project implements the Vehicle interface defined in the library. The Bus car does not override the getColor() method declared within the modified interface (i.e. Vehicle). Then, a broken use is reported pointing to the class declaration.

// Broken use reported here
public class Bus implements Vehicle {
  @Override
  public String getType() {
    return "Bus";
  }
}