The MapContent.layers method currently returns a CopyOnWriteList. Can't think of a good reason for this and it makes it a pain to mock in unit tests. Change the return type to be List.
Environment
None
Attachments
1
layers-method.patch
07 Apr, 2015
Activity
codehaus
April 10, 2015 at 2:51 PM
CodeHaus Comment From: mbedward - Time: Tue, 18 Oct 2011 05:34:02 -0500 ---------------------
committed changes to trunk (r38245) and 2.7.x branch (r38246)
codehaus
April 10, 2015 at 2:51 PM
CodeHaus Comment From: mbedward - Time: Mon, 17 Oct 2011 03:56:05 -0500 ---------------------
Need to sort out <a href="https://jira.codehaus.org/browse/GEOT-3915" title="MapConent.addLayer and MapContent.layers().add method should have same behaviour" class="issue-link" data-issue-key="GEOT-3915"><strike>GEOT-3915</strike></a> before doing a revised patch with unit tests for this issue.
codehaus
April 10, 2015 at 2:51 PM
CodeHaus Comment From: mbedward - Time: Fri, 14 Oct 2011 08:51:28 -0500 ---------------------
The attached patch changes the return type of the MapContent.layers() method from CopyOnWriteArrayList to plain List. It also contains a minor edit for gt-swt.
The MapContent.layers method currently returns a CopyOnWriteList. Can't think of a good reason for this and it makes it a pain to mock in unit tests. Change the return type to be List.