Adapt to Gerrit stable-3.6
Change-Id: I130acb47f0aae9de444f35b2239d009b5c502e1d
diff --git a/github-oauth/pom.xml b/github-oauth/pom.xml
index 0b7a9b5..dc8b456 100644
--- a/github-oauth/pom.xml
+++ b/github-oauth/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>com.googlesource.gerrit.plugins.github</groupId>
<artifactId>github-parent</artifactId>
- <version>3.5.0.1</version>
+ <version>3.6.0-rc1</version>
</parent>
<artifactId>github-oauth</artifactId>
<name>Gerrit Code Review - GitHub OAuth login</name>
diff --git a/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/OAuthFilter.java b/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/OAuthFilter.java
index 5025002..425755f 100644
--- a/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/OAuthFilter.java
+++ b/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/OAuthFilter.java
@@ -29,7 +29,7 @@
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.slf4j.LoggerFactory;
@Singleton
diff --git a/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/OAuthWebFilter.java b/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/OAuthWebFilter.java
index 316d1bb..87f56e5 100644
--- a/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/OAuthWebFilter.java
+++ b/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/OAuthWebFilter.java
@@ -31,7 +31,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.eclipse.jgit.errors.ConfigInvalidException;
import org.eclipse.jgit.storage.file.FileBasedConfig;
import org.eclipse.jgit.util.FS;
diff --git a/github-plugin/pom.xml b/github-plugin/pom.xml
index fed554e..e12fd99 100644
--- a/github-plugin/pom.xml
+++ b/github-plugin/pom.xml
@@ -20,7 +20,7 @@
<parent>
<artifactId>github-parent</artifactId>
<groupId>com.googlesource.gerrit.plugins.github</groupId>
- <version>3.5.0.1</version>
+ <version>3.6.0-rc1</version>
</parent>
<artifactId>github-plugin</artifactId>
diff --git a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/git/PullRequestCreateChange.java b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/git/PullRequestCreateChange.java
index 9a16329..3d0ec26 100644
--- a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/git/PullRequestCreateChange.java
+++ b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/git/PullRequestCreateChange.java
@@ -43,6 +43,7 @@
import com.google.inject.Inject;
import com.google.inject.Provider;
import java.io.IOException;
+import java.time.Instant;
import java.util.Collections;
import java.util.List;
import org.eclipse.jgit.lib.ObjectId;
@@ -100,7 +101,9 @@
RestApiException {
try (BatchUpdate bu =
updateFactory.create(
- project.getNameKey(), userFactory.create(pullRequestOwner), TimeUtil.nowTs())) {
+ project.getNameKey(),
+ userFactory.create(pullRequestOwner),
+ Instant.now())) {
return internalAddCommitToChange(
bu,
@@ -254,7 +257,7 @@
Change.id(sequences.nextChangeId()),
pullRequestOwner,
BranchNameKey.create(project, destRef.getName()),
- TimeUtil.nowTs());
+ Instant.now());
if (topic != null) {
change.setTopic(topic);
}
diff --git a/pom.xml b/pom.xml
index 106f4c3..077cdfb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -18,7 +18,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.googlesource.gerrit.plugins.github</groupId>
<artifactId>github-parent</artifactId>
- <version>3.5.0.2</version>
+ <version>3.6.0-rc1</version>
<name>Gerrit Code Review - GitHub integration</name>
<url>http://www.gerritforge.com</url>
<packaging>pom</packaging>