small performance fixes : unnecessary unboxing operations removed
Motivation : Unboxing operations allocate unnecessary objects when it could be avoided. Modifications: Replaced Float.valueOf with Number.parseFloat where possible. Result: Less unnecessary objects allocations.
This commit is contained in:
parent
5ed02fa585
commit
7a4a27574f
@ -141,7 +141,7 @@ public class HttpContentCompressor extends HttpContentEncoder {
|
||||
int equalsPos = encoding.indexOf('=');
|
||||
if (equalsPos != -1) {
|
||||
try {
|
||||
q = Float.valueOf(encoding.substring(equalsPos + 1));
|
||||
q = Float.parseFloat(encoding.substring(equalsPos + 1));
|
||||
} catch (NumberFormatException e) {
|
||||
// Ignore encoding
|
||||
q = 0.0f;
|
||||
|
Loading…
x
Reference in New Issue
Block a user