Commit 9df61650 authored by Tagir Valeev's avatar Tagir Valeev Committed by daryl herzmann

max_items reading is fixed (#612)

OF-1157
parent 967d632e
...@@ -69,7 +69,7 @@ public class GetListActiveUsers extends AdHocCommand { ...@@ -69,7 +69,7 @@ public class GetListActiveUsers extends AdHocCommand {
public void execute(SessionData data, Element command) { public void execute(SessionData data, Element command) {
String max_items = data.getData().get("max_items").get(0); String max_items = data.getData().get("max_items").get(0);
int maxItems = -1; int maxItems = -1;
if (max_items != null && "none".equals(max_items)) { if (max_items != null && !"none".equals(max_items)) {
try { try {
maxItems = Integer.parseInt(max_items); maxItems = Integer.parseInt(max_items);
} }
......
...@@ -73,7 +73,7 @@ public class GetUsersPresence extends AdHocCommand { ...@@ -73,7 +73,7 @@ public class GetUsersPresence extends AdHocCommand {
public void execute(SessionData data, Element command) { public void execute(SessionData data, Element command) {
String max_items = data.getData().get("max_items").get(0); String max_items = data.getData().get("max_items").get(0);
int maxItems = -1; int maxItems = -1;
if (max_items != null && "none".equals(max_items)) { if (max_items != null && !"none".equals(max_items)) {
try { try {
maxItems = Integer.parseInt(max_items); maxItems = Integer.parseInt(max_items);
} }
......
...@@ -99,7 +99,7 @@ public class GetListGroups extends AdHocCommand { ...@@ -99,7 +99,7 @@ public class GetListGroups extends AdHocCommand {
} }
} }
int maxItems = 100000; int maxItems = 100000;
if (max_items != null && "none".equals(max_items)) { if (max_items != null && !"none".equals(max_items)) {
try { try {
maxItems = Integer.parseInt(max_items); maxItems = Integer.parseInt(max_items);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment