fixed sonar issues in ResourceAllocator.java