Skip to content

Commit

Permalink
Override base method.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkocher committed Nov 14, 2024
1 parent 4030681 commit 94cccca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions core/src/main/java/ch/cyberduck/core/Collection.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,12 @@ public void add(int row, E item) {
this.collectionItemAdded(item);
}

public void replace(int row, E item) {
this.set(row, item);
public E set(int row, E item) {
final E previous = super.set(row, item);
for(CollectionListener<E> listener : listeners) {
listener.collectionItemChanged(item);
}
return previous;
}

public void move(int from, int to) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void fileWritten(final Local file) {
// Found bookmark with matching UUID
if(new HostEditComparator().compare(bookmark, this.get(index)) != 0) {
log.debug("Replace bookmark {} at index {}", bookmark, index);
this.replace(index, bookmark);
this.set(index, bookmark);
}
}
}
Expand Down

0 comments on commit 94cccca

Please sign in to comment.