This is an automated email from the ASF dual-hosted git repository. pdallig pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/master by this push: new a645eb0 [ZEPPELIN-5404] Remove joda-time a645eb0 is described below commit a645eb02940055c55dcea0190869bcc432bf3e1a Author: Philipp Dallig <philipp.dal...@gmail.com> AuthorDate: Mon Jun 7 08:08:31 2021 +0200 [ZEPPELIN-5404] Remove joda-time ### What is this PR for? This PR removes joda-time, which is not necessary with JDK8+ ### What type of PR is it? - Improvement ### What is the Jira issue? * https://issues.apache.org/jira/browse/ZEPPELIN-5404 ### How should this be tested? * CI ### Questions: * Does the licenses files need update? Yes * Is there breaking changes for older versions? No * Does this needs documentation? No Author: Philipp Dallig <philipp.dal...@gmail.com> Closes #4131 from Reamer/joda_time and squashes the following commits: 7e92e549e [Philipp Dallig] Remove joda-time, because its included in jdk8 --- pom.xml | 7 ------- zeppelin-distribution/src/bin_license/LICENSE | 1 - zeppelin-plugins/notebookrepo/filesystem/pom.xml | 8 -------- .../java/org/apache/zeppelin/service/NotebookService.java | 11 +++++------ zeppelin-zengine/pom.xml | 5 ----- 5 files changed, 5 insertions(+), 27 deletions(-) diff --git a/pom.xml b/pom.xml index d437970..19bd52b 100644 --- a/pom.xml +++ b/pom.xml @@ -140,7 +140,6 @@ <commons.collections.version>3.2.2</commons.collections.version> <commons.cli.version>1.4</commons.cli.version> <shiro.version>1.7.0</shiro.version> - <joda.version>2.9.9</joda.version> <bouncycastle.version>1.60</bouncycastle.version> <maven.version>3.6.3</maven.version> <dropwizard.version>4.1.14</dropwizard.version> @@ -353,12 +352,6 @@ <version>${commons.cli.version}</version> </dependency> - <dependency> - <groupId>joda-time</groupId> - <artifactId>joda-time</artifactId> - <version>${joda.version}</version> - </dependency> - <!-- Apache Shiro --> <dependency> <groupId>org.apache.shiro</groupId> diff --git a/zeppelin-distribution/src/bin_license/LICENSE b/zeppelin-distribution/src/bin_license/LICENSE index 878ac0c..bba35ee 100644 --- a/zeppelin-distribution/src/bin_license/LICENSE +++ b/zeppelin-distribution/src/bin_license/LICENSE @@ -57,7 +57,6 @@ The following components are provided under Apache License. (Apache 2.0) Jackson (com.fasterxml.jackson.core:jackson-databind:2.9.10.6 - https://github.com/FasterXML/jackson-core) (Apache 2.0) Jackson Mapper ASL (org.codehaus.jackson:jackson-mapper-asl:1.9.13 - https://mvnrepository.com/artifact/org.codehaus.jackson/jackson-mapper-asl/1.9.13) (Apache 2.0) javax.servlet (org.eclipse.jetty.orbit:javax.servlet:jar:3.1.0.v201112011016 - http://www.eclipse.org/jetty) - (Apache 2.0) Joda-Time (joda-time:joda-time:2.8.1 - http://www.joda.org/joda-time/) (Apache 2.0) Jackson (org.codehaus.jackson:jackson-core-asl:1.9.13 - http://jackson.codehaus.org/) (Apache 2.0) Javassist (org.javassist:javassist:jar:3.18.1-GA:compile - http://jboss-javassist.github.io/javassist/) (Apache 2.0) JetS3t (net.java.dev.jets3t:jets3t:jar:0.9.3) - http://www.jets3t.org/ diff --git a/zeppelin-plugins/notebookrepo/filesystem/pom.xml b/zeppelin-plugins/notebookrepo/filesystem/pom.xml index 1dbc6f3..4232b5e 100644 --- a/zeppelin-plugins/notebookrepo/filesystem/pom.xml +++ b/zeppelin-plugins/notebookrepo/filesystem/pom.xml @@ -127,10 +127,6 @@ <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> </exclusion> - <exclusion> - <groupId>joda-time</groupId> - <artifactId>joda-time</artifactId> - </exclusion> </exclusions> </dependency> </dependencies> @@ -238,10 +234,6 @@ <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> </exclusion> - <exclusion> - <groupId>joda-time</groupId> - <artifactId>joda-time</artifactId> - </exclusion> </exclusions> </dependency> </dependencies> diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/service/NotebookService.java b/zeppelin-server/src/main/java/org/apache/zeppelin/service/NotebookService.java index dd6bb08..db324ac 100644 --- a/zeppelin-server/src/main/java/org/apache/zeppelin/service/NotebookService.java +++ b/zeppelin-server/src/main/java/org/apache/zeppelin/service/NotebookService.java @@ -27,6 +27,8 @@ import com.google.common.base.Strings; import java.io.IOException; import java.text.ParseException; import java.text.SimpleDateFormat; +import java.time.Instant; +import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedList; @@ -59,9 +61,6 @@ import org.apache.zeppelin.rest.exception.ParagraphNotFoundException; import org.apache.zeppelin.scheduler.Job; import org.apache.zeppelin.user.AuthenticationInfo; import org.bitbucket.cowwoc.diffmatchpatch.DiffMatchPatch; -import org.joda.time.DateTime; -import org.joda.time.format.DateTimeFormat; -import org.joda.time.format.DateTimeFormatter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -79,7 +78,7 @@ public class NotebookService { private static final Logger LOGGER = LoggerFactory.getLogger(NotebookService.class); private static final DateTimeFormatter TRASH_CONFLICT_TIMESTAMP_FORMATTER = - DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss"); + DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); private ZeppelinConfiguration zConf; private Notebook notebook; @@ -1024,7 +1023,7 @@ public class NotebookService { } String destNotePath = "/" + NoteManager.TRASH_FOLDER + note.getPath(); if (notebook.containsNote(destNotePath)) { - destNotePath = destNotePath + " " + TRASH_CONFLICT_TIMESTAMP_FORMATTER.print(new DateTime()); + destNotePath = destNotePath + " " + TRASH_CONFLICT_TIMESTAMP_FORMATTER.format(Instant.now()); } notebook.moveNote(noteId, destNotePath, context.getAutheInfo()); callback.onSuccess(note, context); @@ -1041,7 +1040,7 @@ public class NotebookService { String destFolderPath = "/" + NoteManager.TRASH_FOLDER + "/" + folderPath; if (notebook.containsNote(destFolderPath)) { destFolderPath = destFolderPath + " " + - TRASH_CONFLICT_TIMESTAMP_FORMATTER.print(new DateTime()); + TRASH_CONFLICT_TIMESTAMP_FORMATTER.format(Instant.now()); } notebook.moveFolder("/" + folderPath, destFolderPath, context.getAutheInfo()); diff --git a/zeppelin-zengine/pom.xml b/zeppelin-zengine/pom.xml index ec3908c..221fd6c 100644 --- a/zeppelin-zengine/pom.xml +++ b/zeppelin-zengine/pom.xml @@ -94,11 +94,6 @@ </dependency> <dependency> - <groupId>joda-time</groupId> - <artifactId>joda-time</artifactId> - </dependency> - - <dependency> <groupId>org.bouncycastle</groupId> <artifactId>bcpkix-jdk15on</artifactId> </dependency>