Skip to content

[ZEPPELIN-4476] Running Trash Restore will result in an error#3549

Closed
eldiem wants to merge 3 commits into
apache:masterfrom
eldiem:zeppelin-4476
Closed

[ZEPPELIN-4476] Running Trash Restore will result in an error#3549
eldiem wants to merge 3 commits into
apache:masterfrom
eldiem:zeppelin-4476

Conversation

@eldiem
Copy link
Copy Markdown
Contributor

@eldiem eldiem commented Dec 9, 2019

What is this PR for?

If you run a restore when there are two or more notes or folders, an error occurs.

Screen Shot 2019-12-09 at 10 19 15 PM

What type of PR is it?

[Bug Fix]

Todos

  • - Update note list after emptying the Trash
  • - Fixes an error when running Trash restore

What is the Jira issue?

https://issues.apache.org/jira/browse/ZEPPELIN-4476

How should this be tested?

(before)
Dec-09-2019 22-57-57
Dec-09-2019 23-13-49

(after)
Dec-09-2019 23-11-29
Dec-09-2019 22-55-39

NoteManager.Folder trash = noteManager.getTrashFolder();
// restore notes under trash folder
for (NoteManager.NoteNode noteNode : trash.getNotes().values()) {
List<NoteNode> notes = trash.getNotes().values().stream().collect(Collectors.toList());
Copy link
Copy Markdown
Contributor

@zjffdu zjffdu Dec 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add one line of comment to explain why we need to do like this ? So that others won't refactor it in future

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add a comment

@zjffdu
Copy link
Copy Markdown
Contributor

zjffdu commented Dec 11, 2019

Thanks @eldiem LGTM, will merge if no more comment

@asfgit asfgit closed this in bbdc641 Dec 11, 2019
@eldiem eldiem deleted the zeppelin-4476 branch January 6, 2020 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants