Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
AbstractSingletonService: fix helper method
The filterInstances method should not alter the return type of the input
list. The purpose of that method is to potentially remove some elements
from the input list -- nothing more -- so it should still return a
List<PT>, not something else.
  • Loading branch information
hinerm authored and ctrueden committed May 12, 2015
commit 05b15376bb9a38fe813092390dae834326ec0d53
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public boolean registerAppMenus(final Object menus) {
}

@Override
public List<? extends Platform> filterInstances(final List<Platform> list) {
public List<Platform> filterInstances(final List<Platform> list) {
final Iterator<Platform> iter = list.iterator();
while (iter.hasNext()) {
if (!iter.next().isTarget()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void initialize() {
objectService.getIndex().addLater(new LazyObjects<PT>() {

@Override
public ArrayList<PT> get() {
public List<PT> get() {
return new ArrayList<PT>(getInstances());
}

Expand All @@ -108,7 +108,7 @@ public Class<?> getType() {
* @param list the initial list of instances
* @return the filtered list of instances
*/
protected List<? extends PT> filterInstances(final List<PT> list) {
protected List<PT> filterInstances(final List<PT> list) {
return list;
}

Expand Down