Commit 7ec7e393 authored by God Ly's avatar God Ly Committed by it2000

Invalid radix removed (Integer.parseInt(i ,-1);).

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@11694 b35dd754-fafc-0310-a699-88a17e54d16e
parent 62653123
...@@ -1804,11 +1804,14 @@ public class LdapManager { ...@@ -1804,11 +1804,14 @@ public class LdapManager {
List<String> results = new ArrayList<String>(); List<String> results = new ArrayList<String>();
int pageSize = -1; int pageSize = -1;
String pageSizeStr = properties.get("ldap.pagedResultsSize"); String pageSizeStr = properties.get("ldap.pagedResultsSize");
try { if (pageSizeStr != null)
if (pageSizeStr != null) pageSize = Integer.parseInt(pageSizeStr, -1); {
} try {
catch (NumberFormatException e) { pageSize = Integer.parseInt(pageSizeStr); /* radix -1 is invalid */
// poorly formatted number, ignoring }
catch (NumberFormatException e) {
// poorly formatted number, ignoring
}
} }
Boolean clientSideSort = false; Boolean clientSideSort = false;
String clientSideSortStr = properties.get("ldap.clientSideSorting"); String clientSideSortStr = properties.get("ldap.clientSideSorting");
...@@ -2016,11 +2019,13 @@ public class LdapManager { ...@@ -2016,11 +2019,13 @@ public class LdapManager {
public Integer retrieveListCount(String attribute, String searchFilter) { public Integer retrieveListCount(String attribute, String searchFilter) {
int pageSize = -1; int pageSize = -1;
String pageSizeStr = properties.get("ldap.pagedResultsSize"); String pageSizeStr = properties.get("ldap.pagedResultsSize");
try { if (pageSizeStr != null) {
if (pageSizeStr != null) pageSize = Integer.parseInt(pageSizeStr, -1); try {
} pageSize = Integer.parseInt(pageSizeStr); /* radix -1 is invalid */
catch (NumberFormatException e) { }
// poorly formatted number, ignoring catch (NumberFormatException e) {
// poorly formatted number, ignoring
}
} }
LdapContext ctx = null; LdapContext ctx = null;
LdapContext ctx2 = null; LdapContext ctx2 = null;
......
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