Nullability fine-tuning around declaration inconsistencies

Issue: SPR-15720
Issue: SPR-15792
This commit is contained in:
Juergen Hoeller
2017-07-19 22:22:14 +02:00
parent 68e6b148cb
commit 46eba3dbfa
186 changed files with 986 additions and 619 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,6 +18,8 @@ package org.springframework.scheduling.commonj;
import commonj.timers.TimerListener;
import org.springframework.lang.Nullable;
/**
* JavaBean that describes a scheduled TimerListener, consisting of
* the TimerListener itself (or a Runnable to create a TimerListener for)
@@ -40,6 +42,7 @@ import commonj.timers.TimerListener;
*/
public class ScheduledTimerListener {
@Nullable
private TimerListener timerListener;
private long delay = 0;
@@ -140,13 +143,14 @@ public class ScheduledTimerListener {
/**
* Set the TimerListener to schedule.
*/
public void setTimerListener(TimerListener timerListener) {
public void setTimerListener(@Nullable TimerListener timerListener) {
this.timerListener = timerListener;
}
/**
* Return the TimerListener to schedule.
*/
@Nullable
public TimerListener getTimerListener() {
return this.timerListener;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,6 +24,7 @@ import freemarker.template.TemplateException;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ResourceLoaderAware;
import org.springframework.lang.Nullable;
/**
* Factory bean that creates a FreeMarker Configuration and provides it as
@@ -53,6 +54,7 @@ import org.springframework.context.ResourceLoaderAware;
public class FreeMarkerConfigurationFactoryBean extends FreeMarkerConfigurationFactory
implements FactoryBean<Configuration>, InitializingBean, ResourceLoaderAware {
@Nullable
private Configuration configuration;