Fix findbugs warning in HypervDirectConnectResource.java Two boxed Longs were being created instead of simple long

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #422
This commit is contained in:
Rafael da Fonseca 2015-06-14 17:01:22 +02:00 committed by Rohit Yadav
parent 30457556f9
commit 9d2fef0de8

View File

@ -2081,8 +2081,8 @@ public class HypervDirectConnectResource extends ServerResourceBase implements S
String[] splitResult = result.split(":");
int i = 0;
while (i < splitResult.length - 1) {
stats[0] += (new Long(splitResult[i++])).longValue();
stats[1] += (new Long(splitResult[i++])).longValue();
stats[0] += Long.parseLong(splitResult[i++]);
stats[1] += Long.parseLong(splitResult[i++]);
}
} catch (Throwable e) {
s_logger.warn("Unable to parse return from script return of network usage command: " + e.toString(), e);