Merge branch 'stable-3.0'
* stable-3.0:
Fix project import rollback
Adapt to Gerrit v3.0.0 API
Bump API version to v2.16.8
Change-Id: I9a0f41ad4fa87392e899fbe348f30c63bea7c27f
diff --git a/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/groups/OrganizationStructure.java b/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/groups/OrganizationStructure.java
index 8a56d0f..5f77715 100644
--- a/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/groups/OrganizationStructure.java
+++ b/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/groups/OrganizationStructure.java
@@ -43,9 +43,7 @@
@Override
public String toString() {
- return teams
- .entrySet()
- .stream()
+ return teams.entrySet().stream()
.map(org -> "Organization " + org.getKey() + " Teams: " + org.getValue())
.collect(Collectors.joining(" : "));
}
diff --git a/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/GitHubLogin.java b/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/GitHubLogin.java
index a26e1fc..6db2338 100644
--- a/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/GitHubLogin.java
+++ b/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/GitHubLogin.java
@@ -185,10 +185,7 @@
}
private List<Scope> scopesForKey(String baseScopeKey) {
- return config
- .scopes
- .entrySet()
- .stream()
+ return config.scopes.entrySet().stream()
.filter(entry -> entry.getKey().name.equals(baseScopeKey))
.map(entry -> entry.getValue())
.findFirst()
diff --git a/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/GitHubOAuthConfig.java b/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/GitHubOAuthConfig.java
index 47387f7..eb81e47 100644
--- a/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/GitHubOAuthConfig.java
+++ b/github-oauth/src/main/java/com/googlesource/gerrit/plugins/github/oauth/GitHubOAuthConfig.java
@@ -105,9 +105,7 @@
enabled = config.getString("auth", null, "type").equalsIgnoreCase(AuthType.HTTP.toString());
scopes = getScopes(config);
sortedScopesKeys =
- scopes
- .keySet()
- .stream()
+ scopes.keySet().stream()
.sorted(Comparator.comparing(ScopeKey::getSequence))
.collect(Collectors.toList());
@@ -142,9 +140,7 @@
}
private Map<ScopeKey, List<Scope>> getScopes(Config config) {
- return config
- .getNames(CONF_SECTION, true)
- .stream()
+ return config.getNames(CONF_SECTION, true).stream()
.filter(k -> k.startsWith("scopes"))
.filter(k -> !k.endsWith("Description"))
.filter(k -> !k.endsWith("Sequence"))