remove last two generics warnings from API part of the code
git-svn-id: https://svn.apache.org/repos/asf/jakarta/httpcomponents/httpclient/trunk@603610 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f4d2074d1e
commit
0603fc9f3c
|
@ -114,15 +114,15 @@ public final class HttpConnectionManagerParams {
|
||||||
("The maximum must be greater than 0.");
|
("The maximum must be greater than 0.");
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<Object,Integer> currentValues = (Map<Object,Integer>)
|
Map<?,?> currentValues = (Map) params.getParameter
|
||||||
params.getParameter(ConnManagerPNames.MAX_HOST_CONNECTIONS);
|
(ConnManagerPNames.MAX_HOST_CONNECTIONS);
|
||||||
// param values are meant to be immutable so we'll make a copy
|
// param values are meant to be immutable so we'll make a copy
|
||||||
// to modify
|
// to modify
|
||||||
Map<Object,Integer> newValues = null;
|
Map<Object,Object> newValues = null;
|
||||||
if (currentValues == null) {
|
if (currentValues == null) {
|
||||||
newValues = new HashMap<Object,Integer>();
|
newValues = new HashMap<Object,Object>();
|
||||||
} else {
|
} else {
|
||||||
newValues = new HashMap<Object,Integer>(currentValues);
|
newValues = new HashMap<Object,Object>(currentValues);
|
||||||
}
|
}
|
||||||
newValues.put(key, new Integer(max));
|
newValues.put(key, new Integer(max));
|
||||||
params.setParameter(ConnManagerPNames.MAX_HOST_CONNECTIONS, newValues);
|
params.setParameter(ConnManagerPNames.MAX_HOST_CONNECTIONS, newValues);
|
||||||
|
@ -183,10 +183,10 @@ public final class HttpConnectionManagerParams {
|
||||||
// if neither a specific nor a default maximum is configured...
|
// if neither a specific nor a default maximum is configured...
|
||||||
int result = DEFAULT_MAX_HOST_CONNECTIONS;
|
int result = DEFAULT_MAX_HOST_CONNECTIONS;
|
||||||
|
|
||||||
Map<Object,Integer> m = (Map<Object,Integer>)
|
Map<?,?> m = (Map) params.getParameter
|
||||||
params.getParameter(ConnManagerPNames.MAX_HOST_CONNECTIONS);
|
(ConnManagerPNames.MAX_HOST_CONNECTIONS);
|
||||||
if (m != null) {
|
if (m != null) {
|
||||||
Integer max = m.get(key);
|
Integer max = (Integer) m.get(key);
|
||||||
if ((max == null) && (key != ROUTE_DEFAULT)) {
|
if ((max == null) && (key != ROUTE_DEFAULT)) {
|
||||||
// no specific maximum, get the configured default
|
// no specific maximum, get the configured default
|
||||||
max = (Integer) m.get(ROUTE_DEFAULT);
|
max = (Integer) m.get(ROUTE_DEFAULT);
|
||||||
|
|
Loading…
Reference in New Issue