You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by GitBox <gi...@apache.org> on 2019/12/10 02:10:08 UTC

[GitHub] [zeppelin] zjffdu commented on a change in pull request #3549: [ZEPPELIN-4476] Running Trash Restore will result in an error

zjffdu commented on a change in pull request #3549: [ZEPPELIN-4476] Running Trash Restore will result in an error
URL: https://github.com/apache/zeppelin/pull/3549#discussion_r355812542
 
 

 ##########
 File path: zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Notebook.java
 ##########
 @@ -297,11 +298,13 @@ public void emptyTrash(AuthenticationInfo subject) throws IOException {
   public void restoreAll(AuthenticationInfo subject) throws IOException {
     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());
 
 Review comment:
   Could you add one line of comment why we need to do like this ? So that others won't refactor it in future

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services