Modify

Opened 3 years ago

Closed 3 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

Description

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:
https://github.com/michaelzangl/josm/commits/test-command (starting with Commands: tests )
https://github.com/michaelzangl/josm/commits/test-command-2 (starting with Code cleanup.)

Attachments (1)

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

Download all attachments as: .zip

Change History (2)

Changed 3 years ago by michael2402

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

comment:1 Changed 3 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
Action
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.