We will specifically be looking at changes involving the interfaces of definitions. These interface changes can be broken down into two groups:
- Additive changes
- Non-additive changes
Additive Changes
Additive changes are when a definition is added. These interface changes pose the least risk in terms of framework compatibility. There is little chance that they will break any existing code unless we are adding an interface that already exists.
Non-additive Changes
Non-additive changes are when a definition is either modified or removed. These interface changes have a higher risk of breaking other areas of the code dependent on these interfaces.
Modifications refer to any alteration to an existing definition. This can be an exhaustive list, so some examples are given below to provide a better idea.
Example 1 - Argument change of function
Old:
public double getArea(double width, double depth) {}
New:
public double getArea(Snapper snapper) {}
Example 2 - Export modifier change of function
Old:
public double getArea(double width, double depth) {}
New:
package double getArea(double width, double depth) {}
Comments
0 comments
Please sign in to leave a comment.