Skip to content

PADL: Remove code duplication between PackageDefault and PackageGhost #447

@luca-sctr

Description

@luca-sctr

While using the GLASS tool on the PADL project I encountered this issue:
Both classes share the following methods with the same implementation:

  • void addConstituent(IGhost aGhost),
  • void addConstituent(IPackageGhost aPackageGhost)

To reduce code duplication, an idea could be to make one of these class a subclass of the other (this should not really affect the type hierarchy since the interfaces don't change).
Another idea would be to simply use a pull up refactoring and add these methods to the Package class, or maybe it is possible to remove these methods completely.

Image

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions