This is an automated email from the ASF dual-hosted git repository. zjffdu pushed a commit to branch branch-0.9 in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/branch-0.9 by this push: new 6c53345 [ZEPPELIN-4742]. Don't include minus sign in paragraph id 6c53345 is described below commit 6c53345f403b93d7eade1db2949cfbe1a4e2afa4 Author: Jeff Zhang <zjf...@apache.org> AuthorDate: Sat Apr 11 12:01:29 2020 +0800 [ZEPPELIN-4742]. Don't include minus sign in paragraph id ### What is this PR for? Trivial PR which just remove minus sign in paragraph id. ### What type of PR is it? [ Improvement ] ### Todos * [ ] - Task ### What is the Jira issue? * https://issues.apache.org/jira/browse/ZEPPELIN-4742 ### How should this be tested? * CI pass ### Screenshots (if appropriate) ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Author: Jeff Zhang <zjf...@apache.org> Closes #3743 from zjffdu/ZEPPELIN-4742 and squashes the following commits: 8d025b391 [Jeff Zhang] [ZEPPELIN-4742]. Don't include minus sign in paragraph id (cherry picked from commit 75ff1d39b0c38e596b2ac2990ab150530a8e37cd) Signed-off-by: Jeff Zhang <zjf...@apache.org> --- .../src/main/java/org/apache/zeppelin/notebook/Paragraph.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java index 096df6d..756db73 100644 --- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java +++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java @@ -136,7 +136,7 @@ public class Paragraph extends JobWithProgressPoller<InterpreterResult> implemen } private static String generateId() { - return "paragraph_" + System.currentTimeMillis() + "_" + new SecureRandom().nextInt(); + return "paragraph_" + System.currentTimeMillis() + "_" + Math.abs(new SecureRandom().nextInt()); } public Map<String, Paragraph> getUserParagraphMap() {