Fix tab and trailing spaces

This commit is contained in:
Kelven Yang 2013-12-16 15:15:15 -08:00
parent 9d3827e6fe
commit 719271b1d9
14 changed files with 485 additions and 484 deletions

View File

@ -41,7 +41,8 @@ public class VmWorkJobDispatcher extends AdapterBase implements AsyncJobDispatch
public static final String VM_WORK_JOB_WAKEUP_DISPATCHER = "VmWorkJobWakeupDispatcher";
@Inject private VirtualMachineManagerImpl _vmMgr;
@Inject private AsyncJobManager _asyncJobMgr;
@Inject
private AsyncJobManager _asyncJobMgr;
@Inject private VMInstanceDao _instanceDao;
private Map<String, VmWorkJobHandler> _handlers;

View File

@ -56,11 +56,11 @@ public class VmWorkStart extends VmWork {
public DeploymentPlan getPlan() {
if(podId != null || clusterId != null || hostId != null || poolId != null || physicalNetworkId != null) {
if (podId != null || clusterId != null || hostId != null || poolId != null || physicalNetworkId != null) {
// this is ugly, to work with legacy code, we need to re-construct the DeploymentPlan hard-codely
// this has to be refactored together with migrating legacy code into the new way
ReservationContext context = null;
if(reservationId != null) {
if (reservationId != null) {
Journal journal = new Journal.LogJournal("VmWorkStart", s_logger);
context = new ReservationContextImpl(reservationId, journal,
CallContext.current().getCallingUser(),
@ -77,7 +77,7 @@ public class VmWorkStart extends VmWork {
}
public void setPlan(DeploymentPlan plan) {
if(plan != null) {
if (plan != null) {
dcId = plan.getDataCenterId();
podId = plan.getPodId();
clusterId = plan.getClusterId();
@ -86,7 +86,7 @@ public class VmWorkStart extends VmWork {
physicalNetworkId = plan.getPhysicalNetworkId();
avoids = plan.getAvoids();
if(plan.getReservationContext() != null)
if (plan.getReservationContext() != null)
reservationId = plan.getReservationContext().getReservationId();
}
}
@ -102,8 +102,8 @@ public class VmWorkStart extends VmWork {
public Map<VirtualMachineProfile.Param, Object> getParams() {
Map<VirtualMachineProfile.Param, Object> map = new HashMap<VirtualMachineProfile.Param, Object>();
if(rawParams != null) {
for(Map.Entry<String, String> entry : rawParams.entrySet()) {
if (rawParams != null) {
for (Map.Entry<String, String> entry : rawParams.entrySet()) {
VirtualMachineProfile.Param key = new VirtualMachineProfile.Param(entry.getKey());
Object val = JobSerializerHelper.fromObjectSerializedString(entry.getValue());
map.put(key, val);
@ -114,9 +114,9 @@ public class VmWorkStart extends VmWork {
}
public void setParams(Map<VirtualMachineProfile.Param, Object> params) {
if(params != null) {
if (params != null) {
rawParams = new HashMap<String, String>();
for(Map.Entry<VirtualMachineProfile.Param, Object> entry : params.entrySet()) {
for (Map.Entry<VirtualMachineProfile.Param, Object> entry : params.entrySet()) {
rawParams.put(entry.getKey().getName(), JobSerializerHelper.toObjectSerializedString(
entry.getValue() instanceof Serializable ? (Serializable)entry.getValue() : entry.getValue().toString()));
}