You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ab...@apache.org on 2017/07/17 18:06:54 UTC
[45/58] [abbrv] geode git commit: GEODE-3095: fix parameter type
mismatch between the diskstore command and controller
GEODE-3095: fix parameter type mismatch between the diskstore command and controller
(cherry picked from commit ee5f60c)
Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/0788ae14
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/0788ae14
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/0788ae14
Branch: refs/heads/master
Commit: 0788ae14c289a7a250c73291a121887c535b7cf5
Parents: 63cd4c7
Author: Jinmei Liao <ji...@pivotal.io>
Authored: Mon Jun 19 11:02:20 2017 -0700
Committer: Jinmei Liao <ji...@pivotal.io>
Committed: Mon Jun 19 21:32:50 2017 -0700
----------------------------------------------------------------------
.../web/controllers/DiskStoreCommandsController.java | 11 ++++++-----
.../geode/management/internal/security/TestCommand.java | 11 +++++++----
2 files changed, 13 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/geode/blob/0788ae14/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/DiskStoreCommandsController.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/DiskStoreCommandsController.java b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/DiskStoreCommandsController.java
index fa074c3..bc20de2 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/DiskStoreCommandsController.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/DiskStoreCommandsController.java
@@ -14,9 +14,8 @@
*/
package org.apache.geode.management.internal.web.controllers;
-import org.apache.geode.internal.lang.StringUtils;
-import org.apache.geode.management.internal.cli.i18n.CliStrings;
-import org.apache.geode.management.internal.cli.util.CommandStringBuilder;
+import java.util.concurrent.Callable;
+
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
@@ -25,7 +24,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
-import java.util.concurrent.Callable;
+import org.apache.geode.internal.lang.StringUtils;
+import org.apache.geode.management.internal.cli.i18n.CliStrings;
+import org.apache.geode.management.internal.cli.util.CommandStringBuilder;
/**
* The DiskStoreCommandsController class implements GemFire Management REST API web service
@@ -109,7 +110,7 @@ public class DiskStoreCommandsController extends AbstractCommandsController {
@RequestParam(value = CliStrings.CREATE_DISK_STORE__DISK_USAGE_WARNING_PCT,
defaultValue = "90") final Float diskUsageWarningPercentage,
@RequestParam(value = CliStrings.CREATE_DISK_STORE__DISK_USAGE_CRITICAL_PCT,
- defaultValue = "99") final Integer diskUsageCriticalPercentage,
+ defaultValue = "99") final Float diskUsageCriticalPercentage,
@RequestParam(value = CliStrings.CREATE_DISK_STORE__GROUP,
required = false) final String[] groups) {
CommandStringBuilder command = new CommandStringBuilder(CliStrings.CREATE_DISK_STORE);
http://git-wip-us.apache.org/repos/asf/geode/blob/0788ae14/geode-core/src/test/java/org/apache/geode/management/internal/security/TestCommand.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/security/TestCommand.java b/geode-core/src/test/java/org/apache/geode/management/internal/security/TestCommand.java
index 3f8f4d9..853a988 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/security/TestCommand.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/security/TestCommand.java
@@ -14,11 +14,13 @@
*/
package org.apache.geode.management.internal.security;
-import org.apache.geode.security.ResourcePermission;
-import org.apache.shiro.authz.Permission;
-
import java.util.ArrayList;
import java.util.List;
+import java.util.stream.Collectors;
+
+import org.apache.shiro.authz.Permission;
+
+import org.apache.geode.security.ResourcePermission;
public class TestCommand {
@@ -66,7 +68,8 @@ public class TestCommand {
}
public static List<TestCommand> getCommands() {
- return testCommands;
+ // returns a copy of the list every time
+ return testCommands.stream().collect(Collectors.toList());
}
public static List<TestCommand> getPermittedCommands(Permission permission) {