Avoid unnecessary generics on emptyMap/Set/List

This commit is contained in:
Juergen Hoeller
2016-09-26 18:04:49 +02:00
parent a6b0b6e279
commit fb7ae010c8
35 changed files with 69 additions and 73 deletions

View File

@@ -555,7 +555,7 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
public Collection<CacheOperationContext> get(Class<? extends CacheOperation> operationClass) {
Collection<CacheOperationContext> result = this.contexts.get(operationClass);
return (result != null ? result : Collections.<CacheOperationContext>emptyList());
return (result != null ? result : Collections.emptyList());
}
public boolean isSynchronized() {

View File

@@ -134,7 +134,7 @@ public class ScheduledTaskRegistrar implements InitializingBean, DisposableBean
*/
public List<TriggerTask> getTriggerTaskList() {
return (this.triggerTasks != null? Collections.unmodifiableList(this.triggerTasks) :
Collections.<TriggerTask>emptyList());
Collections.emptyList());
}
/**
@@ -165,7 +165,7 @@ public class ScheduledTaskRegistrar implements InitializingBean, DisposableBean
*/
public List<CronTask> getCronTaskList() {
return (this.cronTasks != null ? Collections.unmodifiableList(this.cronTasks) :
Collections.<CronTask>emptyList());
Collections.emptyList());
}
/**
@@ -196,7 +196,7 @@ public class ScheduledTaskRegistrar implements InitializingBean, DisposableBean
*/
public List<IntervalTask> getFixedRateTaskList() {
return (this.fixedRateTasks != null ? Collections.unmodifiableList(this.fixedRateTasks) :
Collections.<IntervalTask>emptyList());
Collections.emptyList());
}
/**
@@ -227,7 +227,7 @@ public class ScheduledTaskRegistrar implements InitializingBean, DisposableBean
*/
public List<IntervalTask> getFixedDelayTaskList() {
return (this.fixedDelayTasks != null ? Collections.unmodifiableList(this.fixedDelayTasks) :
Collections.<IntervalTask>emptyList());
Collections.emptyList());
}