clean code

This commit is contained in:
Peter Hormanns 2013-01-21 13:41:41 +01:00
parent 3419f107df
commit 932ca07115

View File

@ -30,7 +30,6 @@ public class PacRemote extends AbstractRemote {
resultMap.put("cancelled", TextUtil.format(cancelled));
}
resultMap.put("basepac", pac.getBasepac().getName());
Map<String, Object> components = new HashMap<String, Object>();
Set<PacComponent> pacComponents = pac.getPacComponents();
for (PacComponent comp : pacComponents) {
@ -40,28 +39,6 @@ public class PacRemote extends AbstractRemote {
}
}
resultMap.put("components", components);
// SortedSet<PacComponent> sortedComponents = new TreeSet<PacComponent>(new Comparator<PacComponent>() {
// @Override
// public int compare(PacComponent o1, PacComponent o2) {
// return o2.getBaseComponent().getSorting() - o1.getBaseComponent().getSorting();
// }
// });
// sortedComponents.addAll(pac.getPacComponents());
// StringBuffer bf = new StringBuffer();
// boolean empty = true;
// for (PacComponent comp : sortedComponents) {
// if (comp.getQuantity() > 0) {
// if (!empty) {
// bf.append("; ");
// }
// bf.append(comp.getBaseComponent().getFeature());
// bf.append("=");
// bf.append(comp.getQuantity());
// empty = false;
// }
// }
// resultMap.put("components", bf.toString());
}
@Override
@ -79,7 +56,6 @@ public class PacRemote extends AbstractRemote {
basePac.setName(basePacName);
pac.setBasepac(basePac);
}
// pac.setCreated(new Date());
String createdStr = (String) setParams.get("created");
if (createdStr != null && !createdStr.isEmpty()) {
Date createdDate = TextUtil.parse(createdStr);