Title: Provide a mechanism to create a new delta from an existing delta without caring about its type · Issue #75 · java-diff-utils/java-diff-utils · GitHub
Open Graph Title: Provide a mechanism to create a new delta from an existing delta without caring about its type · Issue #75 · java-diff-utils/java-diff-utils
X Title: Provide a mechanism to create a new delta from an existing delta without caring about its type · Issue #75 · java-diff-utils/java-diff-utils
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. T...
Open Graph 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 metho...
X 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 m...
Opengraph URL: https://github.com/java-diff-utils/java-diff-utils/issues/75
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Provide a mechanism to create a new delta from an existing delta without caring about its type","articleBody":"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:\r\n\r\n1. I don't want my method to know/care what the delta type is.\r\n2. The `AbstractDelta` class is abstract, so I cannot simply invoke its constructor.\r\n3. The `AbstractDelta` subtypes do not provide `with()` methods.\r\n4. Some of your code (e.g. `DiffRowGenerator`) check the class type instance (e.g. `if (delta instanceof InsertDelta)` instead of using `AbstractDelta.getType()` so I cannot subclass `AbstractDelta` myself.\r\n\r\nProbably the easiest way to resolve this is to add an abstract `withChunks(Chunk\u003cT\u003e original, Chunk\u003cT\u003e revised)` method to `AbstractDelta`.","author":{"url":"https://github.com/cowwoc","@type":"Person","name":"cowwoc"},"datePublished":"2020-04-10T04:21:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/75/java-diff-utils/issues/75"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:89cea73b-b5b4-e542-4192-22bbafc24768 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AB2E:9F506:116812B:173CDC2:6969AA46 |
| html-safe-nonce | b96015b94d8058f46a719d28aa7d741ee06f2dc566f74addc1e0b41bb768746b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQjJFOjlGNTA2OjExNjgxMkI6MTczQ0RDMjo2OTY5QUE0NiIsInZpc2l0b3JfaWQiOiI0NjgxNjU4OTcwMjUyMzU2MTY2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 36d26d026cd5e59c0504bff1d913f1c9c5bab5035e55b5a552c97ca100748286 |
| hovercard-subject-tag | issue:597686361 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/java-diff-utils/java-diff-utils/75/issue_layout |
| twitter:image | https://opengraph.githubassets.com/de854e0a25ca487c59affd0733c9e55e7b71bfff8ee085241b4df902875ce39c/java-diff-utils/java-diff-utils/issues/75 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/de854e0a25ca487c59affd0733c9e55e7b71bfff8ee085241b4df902875ce39c/java-diff-utils/java-diff-utils/issues/75 |
| og:image:alt | 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 metho... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cowwoc |
| hostname | github.com |
| expected-hostname | github.com |
| None | 24c4c97a2d520cb286b35e1a4c22d7a4df3c26a2fa28dd7cdf0e65db327b4de7 |
| turbo-cache-control | no-preview |
| go-import | github.com/java-diff-utils/java-diff-utils git https://github.com/java-diff-utils/java-diff-utils.git |
| octolytics-dimension-user_id | 40540835 |
| octolytics-dimension-user_login | java-diff-utils |
| octolytics-dimension-repository_id | 86663812 |
| octolytics-dimension-repository_nwo | java-diff-utils/java-diff-utils |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 86663812 |
| octolytics-dimension-repository_network_root_nwo | java-diff-utils/java-diff-utils |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 124667f43168afb6c9c03b7c02eb5b1d2e1be3d9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width