Opened 7 years ago

Closed 7 years ago

#13223 closed enhancement (fixed)

[Patch] Minor command class fixes

Reported by: michael2402 Owned by: team
Priority: normal Milestone: 16.07
Component: Unit tests Version:
Keywords: gsoc-core Cc: Don-vip, bastiK, stoecker


I started to fix some minor command issues some time ago. I added test cases for them. Since this was very low priority I never took the time to finish it but it should be applied before doing too many Java8 changes.

Fixes include:

  • ChangeNodesCommand fails if nodes are empty (to prevent a plugin from creating empty ways)
  • ChangePropertyCommand did not count empty strings as not set
  • ChangePropertyKeyCommand only sets modified if the object was changed
  • ChangePropertyKeyCommand creates the right child commands
  • ChangeRelationMemberRoleCommand: executeCommand() always returns true
  • ChangeRelationMemberRoleCommand: threw Exception if executeCommand() did not change anything
  • RotateCommand/ScaleCommand: Constructor has more flexible generics
  • RotateCommand: Performance improvements
  • SelectCommand: Copy the selection list
  • *CommandTest: Increase test coverage to ~90% (real tests)

All patches in between should apply nicely. You can get them on github: (starting with Commands: tests ) (starting with Code cleanup.)

Attachments (1)

patch-test-command-3.patch (137.0 KB) - added by michael2402 7 years ago.

Download all attachments as: .zip

Change History (2)

Changed 7 years ago by michael2402

Attachment: patch-test-command-3.patch added

comment:1 Changed 7 years ago by Don-vip

Resolution: fixed
Status: newclosed

In 10663/josm:

fix #13223 - Minor command class fixes (patch by michael2402, modified) - gsoc-core

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.