The
finalmodifier is added to the declaration of a library class.
The final modifier is added to the declaration of the Person class in the library project.
-public class Person { }
+public final class Person { }
Hereafter, we list the broken uses that are currently detected by Maracas.
The Employee class—defined in a client project—extends the class Person.
Then, a broken use is reported pointing to the Employee class declaration as it cannot extend the Person class anymore.
// Broken use reported here
public class Employee extends Person {
}