Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork209
Closed
Labels
Description
I am writing a method that needs to break a delta into pieces (e.g. two deltas that result in the same patch as the original delta). The current design is problematic because:
- I don't want my method to know/care what the delta type is.
- The
AbstractDeltaclass is abstract, so I cannot simply invoke its constructor. - The
AbstractDeltasubtypes do not providewith()methods. - Some of your code (e.g.
DiffRowGenerator) check the class type instance (e.g.if (delta instanceof InsertDelta)instead of usingAbstractDelta.getType()so I cannot subclassAbstractDeltamyself.
Probably the easiest way to resolve this is to add an abstractwithChunks(Chunk<T> original, Chunk<T> revised) method toAbstractDelta.