Mark classes as static when not referencing outer class
FEA: ItEr74S04BugFixing
This commit is contained in:
parent
1a54013e7e
commit
af5ca60af2
19 changed files with 40 additions and 34 deletions
|
|
@ -120,7 +120,8 @@ public class LeftTasksTree extends HtmlMacroComponent {
|
|||
return task.isLeaf() || task.isExpanded();
|
||||
}
|
||||
|
||||
private final class DetailsForBeans {
|
||||
private static final class DetailsForBeans {
|
||||
|
||||
private Map<Task, LeftTasksTreeRow> map = new HashMap<Task, LeftTasksTreeRow>();
|
||||
|
||||
private Set<Task> focusRequested = new HashSet<Task>();
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ public class TaskEditFormComposer extends GenericForwardComposer {
|
|||
*
|
||||
* @author Manuel Rego Casasnovas <mrego@igalia.com>
|
||||
*/
|
||||
public class TaskDTO {
|
||||
public static class TaskDTO {
|
||||
public String name;
|
||||
public Date beginDate;
|
||||
public Date endDate;
|
||||
|
|
|
|||
|
|
@ -33,10 +33,10 @@ import java.util.HashMap;
|
|||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.SortedSet;
|
||||
import java.util.TreeSet;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.hibernate.proxy.HibernateProxy;
|
||||
|
|
@ -279,7 +279,8 @@ public class DeepCopy {
|
|||
|
||||
private Map<ByIdentity, Object> alreadyCopiedObjects = new HashMap<ByIdentity, Object>();
|
||||
|
||||
private class ByIdentity {
|
||||
private static class ByIdentity {
|
||||
|
||||
private final Object wrapped;
|
||||
|
||||
ByIdentity(Object wrapped) {
|
||||
|
|
@ -303,7 +304,6 @@ public class DeepCopy {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private ByIdentity byIdentity(Object value) {
|
||||
|
|
|
|||
|
|
@ -444,7 +444,7 @@ public class ConfigurationController extends GenericForwardComposer {
|
|||
return progressTypeRenderer;
|
||||
}
|
||||
|
||||
private class ProgressTypeRenderer implements ListitemRenderer {
|
||||
private static class ProgressTypeRenderer implements ListitemRenderer {
|
||||
|
||||
@Override
|
||||
public void render(Listitem item, Object data) throws Exception {
|
||||
|
|
@ -702,11 +702,11 @@ public class ConfigurationController extends GenericForwardComposer {
|
|||
}
|
||||
}
|
||||
|
||||
public class EntitySequenceComparator implements Comparator {
|
||||
public static class EntitySequenceComparator implements
|
||||
Comparator<EntitySequence> {
|
||||
|
||||
@Override
|
||||
public int compare(Object o1, Object o2) {
|
||||
EntitySequence seq1 = (EntitySequence) o1;
|
||||
EntitySequence seq2 = (EntitySequence) o2;
|
||||
public int compare(EntitySequence seq1, EntitySequence seq2) {
|
||||
return seq1.getEntityName().compareTo(seq2.getEntityName());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@
|
|||
|
||||
package org.navalplanner.web.common.entrypoints;
|
||||
|
||||
import static org.navalplanner.web.I18nHelper._;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationHandler;
|
||||
import java.lang.reflect.Method;
|
||||
|
|
@ -42,8 +44,6 @@ import org.springframework.core.type.classreading.CachingMetadataReaderFactory;
|
|||
import org.springframework.core.type.classreading.MetadataReader;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
import static org.navalplanner.web.I18nHelper._;
|
||||
|
||||
/**
|
||||
* Creates implemnetations of controllers that sends http redirects to the
|
||||
* proper page <br />
|
||||
|
|
@ -53,7 +53,9 @@ public class RedirectorSynthetiser implements BeanFactoryPostProcessor {
|
|||
private static final Log LOG = LogFactory
|
||||
.getLog(RedirectorSynthetiser.class);
|
||||
|
||||
private final class SynthetizedImplementation implements InvocationHandler {
|
||||
private static final class SynthetizedImplementation implements
|
||||
InvocationHandler {
|
||||
|
||||
private final ConfigurableListableBeanFactory beanFactory;
|
||||
|
||||
private final Class<?> pageInterface;
|
||||
|
|
|
|||
|
|
@ -260,7 +260,8 @@ public class LimitingResourcesController extends GenericForwardComposer {
|
|||
* @author Diego Pino Garcia <dpino@igalia.com>
|
||||
*
|
||||
*/
|
||||
public class LimitingResourceQueueElementDTO implements Comparable<LimitingResourceQueueElementDTO> {
|
||||
public static class LimitingResourceQueueElementDTO implements
|
||||
Comparable<LimitingResourceQueueElementDTO> {
|
||||
|
||||
private final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd/MM/yyyy");
|
||||
|
||||
|
|
|
|||
|
|
@ -473,7 +473,7 @@ public class ManualAllocationController extends GenericForwardComposer {
|
|||
return candidateGapRenderer;
|
||||
}
|
||||
|
||||
private class CandidateGapRenderer implements ListitemRenderer {
|
||||
private static class CandidateGapRenderer implements ListitemRenderer {
|
||||
|
||||
@Override
|
||||
public void render(Listitem item, Object data) throws Exception {
|
||||
|
|
@ -529,7 +529,7 @@ public class ManualAllocationController extends GenericForwardComposer {
|
|||
self.setVariable("status", Integer.valueOf(status), true);
|
||||
}
|
||||
|
||||
private class QueueRenderer implements ListitemRenderer {
|
||||
private static class QueueRenderer implements ListitemRenderer {
|
||||
|
||||
@Override
|
||||
public void render(Listitem item, Object data) throws Exception {
|
||||
|
|
|
|||
|
|
@ -535,7 +535,7 @@ public class MaterialsController extends
|
|||
* RowRenderer for a @{UnitType} element
|
||||
* @author Susana Montes Pedreira <smontes@wirelessgalicia.com>
|
||||
*/
|
||||
public class UnitTypeListRenderer implements ListitemRenderer {
|
||||
public static class UnitTypeListRenderer implements ListitemRenderer {
|
||||
@Override
|
||||
public void render(Listitem listItem, Object data) throws Exception {
|
||||
final UnitType unitType = (UnitType) data;
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@ public class MonteCarloController extends GenericForwardComposer {
|
|||
}
|
||||
}
|
||||
|
||||
private class CriticalPathTasksRender implements RowRenderer {
|
||||
private static class CriticalPathTasksRender implements RowRenderer {
|
||||
|
||||
@Override
|
||||
public void render(Row row, Object data) throws Exception {
|
||||
|
|
|
|||
|
|
@ -449,7 +449,7 @@ public class MonteCarloModel implements IMonteCarloModel {
|
|||
return StringUtils.join(result, ",");
|
||||
}
|
||||
|
||||
private class MonteCarloCalculation {
|
||||
private static class MonteCarloCalculation {
|
||||
|
||||
private Map<MonteCarloTask, Set<EstimationRange>> estimationRangesForTasks = new HashMap<MonteCarloTask, Set<EstimationRange>>();
|
||||
|
||||
|
|
|
|||
|
|
@ -849,7 +849,7 @@ public class ManageOrderElementAdvancesModel implements
|
|||
* pressed, restores the original state of the advance assignments
|
||||
*
|
||||
*/
|
||||
private class CancelOperation {
|
||||
private static class CancelOperation {
|
||||
|
||||
private Set<AdvanceMeasurement> addedMeasurements = new HashSet<AdvanceMeasurement>();
|
||||
|
||||
|
|
|
|||
|
|
@ -114,8 +114,9 @@ public class OrderCRUDController extends GenericForwardComposer {
|
|||
|
||||
private static final String DEFAULT_TAB = "tabOrderElements";
|
||||
|
||||
private final class LabelCreatorForInvalidValues implements
|
||||
private static final class LabelCreatorForInvalidValues implements
|
||||
IMessagesForUser.ICustomLabelCreator {
|
||||
|
||||
@Override
|
||||
public Component createLabelFor(
|
||||
InvalidValue invalidValue) {
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ public class CompanyPlanningController implements Composer {
|
|||
cbProgressTypes.setVisible(true);
|
||||
}
|
||||
|
||||
private class ProgressTypeRenderer implements ComboitemRenderer {
|
||||
private static class ProgressTypeRenderer implements ComboitemRenderer {
|
||||
|
||||
@Override
|
||||
public void render(Comboitem item, Object data) throws Exception {
|
||||
|
|
|
|||
|
|
@ -67,8 +67,8 @@ import org.navalplanner.web.planner.ITaskElementAdapter;
|
|||
import org.navalplanner.web.planner.chart.Chart;
|
||||
import org.navalplanner.web.planner.chart.ChartFiller;
|
||||
import org.navalplanner.web.planner.chart.EarnedValueChartFiller;
|
||||
import org.navalplanner.web.planner.chart.IChartFiller;
|
||||
import org.navalplanner.web.planner.chart.EarnedValueChartFiller.EarnedValueType;
|
||||
import org.navalplanner.web.planner.chart.IChartFiller;
|
||||
import org.navalplanner.web.planner.order.BankHolidaysMarker;
|
||||
import org.navalplanner.web.planner.order.OrderPlanningModel;
|
||||
import org.navalplanner.web.planner.tabs.MultipleTabsPlannerController;
|
||||
|
|
@ -169,8 +169,9 @@ public abstract class CompanyPlanningModel implements ICompanyPlanningModel {
|
|||
this.tabs = entryPoints;
|
||||
}
|
||||
|
||||
private final class TaskElementNavigator implements
|
||||
private static final class TaskElementNavigator implements
|
||||
IStructureNavigator<TaskElement> {
|
||||
|
||||
@Override
|
||||
public List<TaskElement> getChildren(TaskElement object) {
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ public abstract class OrderPlanningModel implements IOrderPlanningModel {
|
|||
|
||||
private OverAllProgressContent overallProgressContent;
|
||||
|
||||
private final class ReturningNewAssignments implements
|
||||
private static final class ReturningNewAssignments implements
|
||||
IAssignmentsOnResourceCalculator {
|
||||
|
||||
private Set<DayAssignment> previousAssignmentsSet;
|
||||
|
|
@ -307,8 +307,9 @@ public abstract class OrderPlanningModel implements IOrderPlanningModel {
|
|||
|
||||
}
|
||||
|
||||
private final class TaskElementNavigator implements
|
||||
private static final class TaskElementNavigator implements
|
||||
IStructureNavigator<TaskElement> {
|
||||
|
||||
@Override
|
||||
public List<TaskElement> getChildren(TaskElement object) {
|
||||
return object.getChildren();
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ import static org.navalplanner.web.I18nHelper._;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
|
@ -216,7 +215,7 @@ public class SchedulingProgressPerOrderController extends NavalplannerReportCont
|
|||
super.showReport(jasperreport);
|
||||
}
|
||||
|
||||
public class AdvanceTypeDTO {
|
||||
public static class AdvanceTypeDTO {
|
||||
|
||||
private String name;
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ import java.util.ArrayList;
|
|||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
|
@ -253,7 +252,7 @@ public class TimeLineRequiredMaterialController extends
|
|||
return new MaterialCategoryRenderer();
|
||||
}
|
||||
|
||||
private class MaterialCategoryRenderer implements TreeitemRenderer {
|
||||
private static class MaterialCategoryRenderer implements TreeitemRenderer {
|
||||
|
||||
/**
|
||||
* Copied verbatim from org.zkoss.zul.Tree;
|
||||
|
|
|
|||
|
|
@ -147,7 +147,8 @@ public class WorkingArrangementsPerOrderController extends NavalplannerReportCon
|
|||
return result;
|
||||
}
|
||||
|
||||
private class TaskStatusEnumComparator implements Comparator<TaskStatusEnum> {
|
||||
private static class TaskStatusEnumComparator implements
|
||||
Comparator<TaskStatusEnum> {
|
||||
|
||||
@Override
|
||||
public int compare(TaskStatusEnum arg0, TaskStatusEnum arg1) {
|
||||
|
|
|
|||
|
|
@ -370,7 +370,7 @@ public class NewAllocationSelectorController extends
|
|||
* Encapsulates {@link SimpleTreeNode}
|
||||
*
|
||||
*/
|
||||
private class CriterionTreeNode extends SimpleTreeNode {
|
||||
private static class CriterionTreeNode extends SimpleTreeNode {
|
||||
|
||||
public CriterionTreeNode(Object data, List<CriterionTreeNode> children) {
|
||||
super(data, children);
|
||||
|
|
@ -471,7 +471,7 @@ public class NewAllocationSelectorController extends
|
|||
*
|
||||
* Render for listBoxResources
|
||||
*/
|
||||
private class ResourceListRenderer implements ListitemRenderer {
|
||||
private static class ResourceListRenderer implements ListitemRenderer {
|
||||
|
||||
@Override
|
||||
public void render(Listitem item, Object data) throws Exception {
|
||||
|
|
@ -511,7 +511,7 @@ public class NewAllocationSelectorController extends
|
|||
* Finally, I tried this solution and it works
|
||||
*
|
||||
*/
|
||||
private class CriterionRenderer implements TreeitemRenderer {
|
||||
private static class CriterionRenderer implements TreeitemRenderer {
|
||||
|
||||
/**
|
||||
* Copied verbatim from org.zkoss.zul.Tree;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue