mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
replaced Integer reference comparsion with .equals
By default only the Integers between -128..127 are cached (unless overridden by java.lang.Integer.IntegerCache.high system property) If the inbound or outbound values are higher, the reference comparison won't work. Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
This commit is contained in:
parent
3e3ded75f4
commit
d22b65f45f
@ -145,8 +145,9 @@ public class LibvirtDomainXMLParser {
|
||||
if ((bandwidth != null) && (bandwidth.getLength() != 0)) {
|
||||
Integer inbound = Integer.valueOf(getAttrValue("inbound", "average", (Element)bandwidth.item(0)));
|
||||
Integer outbound = Integer.valueOf(getAttrValue("outbound", "average", (Element)bandwidth.item(0)));
|
||||
if (inbound == outbound)
|
||||
if (inbound.equals(outbound)) {
|
||||
networkRateKBps = inbound;
|
||||
}
|
||||
}
|
||||
if (type.equalsIgnoreCase("network")) {
|
||||
String network = getAttrValue("source", "network", nic);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user