Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliminate code duplication #5

Open
wants to merge 25 commits into
base: master
Choose a base branch
from

Conversation

kolesar-andras
Copy link

ImproveWay plugin used same code base as ImproveWayAccuracy mode. Half of code was unnecessary duplication with old code. Moreover, both action in core and plugin needed to be maintained. Common code parts have diverged in years.

ImproveWay plugin was refactored to extend ImproveWayAccuracyAction class from core. This change eliminates code duplication. Also fixed NPE bugs.

ImproveWayAccuracyAction class at core needs some changes to be extendible, mostly protected instead of private. I have made a pull request in core repository.

This refactored plugin uses a copy of base class and its modified helper class. This allows to use with current stable JOSM version. Revert commit 97a9883 after base class patch have been merged into core.

... and different from parent class
override much less code than before
java.lang.NullPointerException:
Cannot invoke "org.openstreetmap.josm.data.osm.Way.getRealNodesCount()"
because "this.targetWay" is null
Revert "Use own copy of base class until merge"

This reverts commit b5e8442.
Revert this commit after base class patch have been merged into core

This reverts commit 35d63b8.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant