zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jongy...@apache.org
Subject zeppelin git commit: Revert "[MINOR] Supported old note format in case of not having name of note"
Date Wed, 22 Feb 2017 16:26:47 GMT
Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.7 e2def13cc -> 2b4768c89


Revert "[MINOR] Supported old note format in case of not having name of note"

This reverts commit e2def13cc32e30b3c6c3218e0b12a3337804fea3.


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/2b4768c8
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/2b4768c8
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/2b4768c8

Branch: refs/heads/branch-0.7
Commit: 2b4768c89b91c26660081236c5f2d612dc086cba
Parents: e2def13
Author: Jongyoul Lee <jongyoul@apache.org>
Authored: Thu Feb 23 01:26:29 2017 +0900
Committer: Jongyoul Lee <jongyoul@apache.org>
Committed: Thu Feb 23 01:26:29 2017 +0900

----------------------------------------------------------------------
 .../src/main/java/org/apache/zeppelin/notebook/Note.java      | 5 +----
 .../src/test/java/org/apache/zeppelin/notebook/NoteTest.java  | 7 -------
 2 files changed, 1 insertion(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/2b4768c8/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java
index 7a63879..26f4e1a 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java
@@ -141,9 +141,6 @@ public class Note implements Serializable, ParagraphJobListener {
   }
 
   public String getName() {
-    if (isNameEmpty()) {
-      name = getId();
-    }
     return name;
   }
 
@@ -181,7 +178,7 @@ public class Note implements Serializable, ParagraphJobListener {
   }
 
   public boolean isNameEmpty() {
-    return this.name.trim().isEmpty();
+    return getName().trim().isEmpty();
   }
 
   private String normalizeNoteName(String name) {

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/2b4768c8/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NoteTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NoteTest.java b/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NoteTest.java
index 35b6462..ad6031e 100644
--- a/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NoteTest.java
+++ b/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NoteTest.java
@@ -199,11 +199,4 @@ public class NoteTest {
     note.setName(Folder.TRASH_FOLDER_ID + "/a/b/c");
     assertTrue(note.isTrash());
   }
-
-  @Test
-  public void getNameWithoutNameItself() {
-    Note note = new Note(repo, interpreterFactory, interpreterSettingManager, jobListenerFactory,
index, credentials, noteEventListener);
-
-    assertEquals("getName should return same as getId when name is empty", note.getId(),
note.getName());
-  }
 }


Mime
View raw message