Skip to content

Commit 4d31ed9

Browse files
rsafonsecayadvr
authored andcommitted
Fix findbugs warning in NetworkUsageManagerImpl.java Unnecessary boxing/unboxing of long value to create Date
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com> This closes apache#433
1 parent d7a27c9 commit 4d31ed9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

server/src/com/cloud/network/NetworkUsageManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ private boolean collectDirectNetworkUsage(final HostVO host) {
310310
s_logger.warn("Last collection time not available. Skipping direct usage collection for Traffic Monitor: " + host.getId());
311311
return false;
312312
}
313-
Date lastCollection = new Date(new Long(lastCollectDetail.getValue()));
313+
Date lastCollection = new Date(Long.parseLong(lastCollectDetail.getValue()));
314314

315315
//Get list of IPs currently allocated
316316
List<IPAddressVO> allocatedIps = listAllocatedDirectIps(zoneId);

0 commit comments

Comments
 (0)