Added @Override and @Deprecated annotations to context-support module
This commit is contained in:
parent
631e480f7a
commit
3a26f0d896
|
|
@ -106,6 +106,7 @@ public class MailSendException extends MailException {
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
if (ObjectUtils.isEmpty(this.messageExceptions)) {
|
||||
return super.getMessage();
|
||||
|
|
@ -123,6 +124,7 @@ public class MailSendException extends MailException {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (ObjectUtils.isEmpty(this.messageExceptions)) {
|
||||
return super.toString();
|
||||
|
|
@ -139,6 +141,7 @@ public class MailSendException extends MailException {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void printStackTrace(PrintStream ps) {
|
||||
if (ObjectUtils.isEmpty(this.messageExceptions)) {
|
||||
super.printStackTrace(ps);
|
||||
|
|
@ -154,6 +157,7 @@ public class MailSendException extends MailException {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void printStackTrace(PrintWriter pw) {
|
||||
if (ObjectUtils.isEmpty(this.messageExceptions)) {
|
||||
super.printStackTrace(pw);
|
||||
|
|
|
|||
|
|
@ -199,6 +199,7 @@ public class SimpleMailMessage implements MailMessage, Serializable {
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuffer sb = new StringBuffer("SimpleMailMessage: ");
|
||||
sb.append("from=").append(this.from).append("; ");
|
||||
|
|
@ -212,6 +213,7 @@ public class SimpleMailMessage implements MailMessage, Serializable {
|
|||
return sb.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
|
|
@ -230,6 +232,7 @@ public class SimpleMailMessage implements MailMessage, Serializable {
|
|||
ObjectUtils.nullSafeEquals(this.text, otherMessage.text));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hashCode = (this.from == null ? 0 : this.from.hashCode());
|
||||
hashCode = 29 * hashCode + (this.replyTo == null ? 0 : this.replyTo.hashCode());
|
||||
|
|
|
|||
|
|
@ -168,6 +168,7 @@ public class ConfigurableMimeFileTypeMap extends FileTypeMap implements Initiali
|
|||
* Delegates to the underlying FileTypeMap.
|
||||
* @see #getFileTypeMap()
|
||||
*/
|
||||
@Override
|
||||
public String getContentType(File file) {
|
||||
return getFileTypeMap().getContentType(file);
|
||||
}
|
||||
|
|
@ -176,6 +177,7 @@ public class ConfigurableMimeFileTypeMap extends FileTypeMap implements Initiali
|
|||
* Delegates to the underlying FileTypeMap.
|
||||
* @see #getFileTypeMap()
|
||||
*/
|
||||
@Override
|
||||
public String getContentType(String fileName) {
|
||||
return getFileTypeMap().getContentType(fileName);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ import org.springframework.util.StringUtils;
|
|||
*/
|
||||
public class InternetAddressEditor extends PropertyEditorSupport {
|
||||
|
||||
@Override
|
||||
public void setAsText(String text) throws IllegalArgumentException {
|
||||
if (StringUtils.hasText(text)) {
|
||||
try {
|
||||
|
|
@ -50,6 +51,7 @@ public class InternetAddressEditor extends PropertyEditorSupport {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAsText() {
|
||||
InternetAddress value = (InternetAddress) getValue();
|
||||
return (value != null ? value.toUnicodeString() : "");
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ public class JobDetailBean extends JobDetail
|
|||
* to adapt the given job class to the Quartz Job interface.
|
||||
* @see SchedulerFactoryBean#setJobFactory
|
||||
*/
|
||||
@Override
|
||||
public void setJobClass(Class jobClass) {
|
||||
if (jobClass != null && !Job.class.isAssignableFrom(jobClass)) {
|
||||
super.setJobClass(DelegatingJob.class);
|
||||
|
|
@ -73,6 +74,7 @@ public class JobDetailBean extends JobDetail
|
|||
* Overridden to support any job class, to allow a custom JobFactory
|
||||
* to adapt the given job class to the Quartz Job interface.
|
||||
*/
|
||||
@Override
|
||||
public Class getJobClass() {
|
||||
return (this.actualJobClass != null ? this.actualJobClass : super.getJobClass());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ public class LocalDataSourceJobStore extends JobStoreCMT {
|
|||
private DataSource dataSource;
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize(ClassLoadHelper loadHelper, SchedulerSignaler signaler)
|
||||
throws SchedulerConfigException {
|
||||
|
||||
|
|
@ -133,6 +134,7 @@ public class LocalDataSourceJobStore extends JobStoreCMT {
|
|||
super.initialize(loadHelper, signaler);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void closeConnection(Connection con) {
|
||||
// Will work for transactional and non-transactional connections.
|
||||
DataSourceUtils.releaseConnection(con, this.dataSource);
|
||||
|
|
|
|||
|
|
@ -158,6 +158,7 @@ public class MethodInvokingJobDetailFactoryBean extends ArgumentConvertingMethod
|
|||
this.beanFactory = beanFactory;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class resolveClassName(String className) throws ClassNotFoundException {
|
||||
return ClassUtils.forName(className, this.beanClassLoader);
|
||||
}
|
||||
|
|
@ -200,6 +201,7 @@ public class MethodInvokingJobDetailFactoryBean extends ArgumentConvertingMethod
|
|||
/**
|
||||
* Overridden to support the {@link #setTargetBeanName "targetBeanName"} feature.
|
||||
*/
|
||||
@Override
|
||||
public Class getTargetClass() {
|
||||
Class targetClass = super.getTargetClass();
|
||||
if (targetClass == null && this.targetBeanName != null) {
|
||||
|
|
@ -212,6 +214,7 @@ public class MethodInvokingJobDetailFactoryBean extends ArgumentConvertingMethod
|
|||
/**
|
||||
* Overridden to support the {@link #setTargetBeanName "targetBeanName"} feature.
|
||||
*/
|
||||
@Override
|
||||
public Object getTargetObject() {
|
||||
Object targetObject = super.getTargetObject();
|
||||
if (targetObject == null && this.targetBeanName != null) {
|
||||
|
|
@ -255,6 +258,7 @@ public class MethodInvokingJobDetailFactoryBean extends ArgumentConvertingMethod
|
|||
/**
|
||||
* Invoke the method via the MethodInvoker.
|
||||
*/
|
||||
@Override
|
||||
protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
|
||||
try {
|
||||
this.methodInvoker.invoke();
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ public class SchedulerAccessorBean extends SchedulerAccessor implements BeanFact
|
|||
/**
|
||||
* Return the Quartz Scheduler instance that this accessor operates on.
|
||||
*/
|
||||
@Override
|
||||
public Scheduler getScheduler() {
|
||||
return this.scheduler;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -628,6 +628,7 @@ public class SchedulerFactoryBean extends SchedulerAccessor
|
|||
"] in " + startupDelay + " seconds");
|
||||
}
|
||||
Thread schedulerThread = new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
Thread.sleep(startupDelay * 1000);
|
||||
|
|
@ -656,6 +657,7 @@ public class SchedulerFactoryBean extends SchedulerAccessor
|
|||
// Implementation of FactoryBean interface
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public Scheduler getScheduler() {
|
||||
return this.scheduler;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ public class SpringBeanJobFactory extends AdaptableJobFactory implements Schedul
|
|||
* Create the job instance, populating it with property values taken
|
||||
* from the scheduler context, job data map and trigger data map.
|
||||
*/
|
||||
@Override
|
||||
protected Object createJobInstance(TriggerFiredBundle bundle) {
|
||||
Object job = BeanUtils.instantiateClass(bundle.getJobDetail().getJobClass());
|
||||
BeanWrapper bw = PropertyAccessorFactory.forBeanPropertyAccess(job);
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@ public class FreeMarkerConfigurationFactory {
|
|||
* @see #setPreTemplateLoaders
|
||||
* @see #setPostTemplateLoaders
|
||||
*/
|
||||
@Deprecated
|
||||
public void setTemplateLoaders(TemplateLoader[] templateLoaders) {
|
||||
if (templateLoaders != null) {
|
||||
this.templateLoaders.addAll(Arrays.asList(templateLoaders));
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ public class SpringResourceLoader extends ResourceLoader {
|
|||
private String[] resourceLoaderPaths;
|
||||
|
||||
|
||||
@Override
|
||||
public void init(ExtendedProperties configuration) {
|
||||
this.resourceLoader = (org.springframework.core.io.ResourceLoader)
|
||||
this.rsvc.getApplicationAttribute(SPRING_RESOURCE_LOADER);
|
||||
|
|
@ -93,6 +94,7 @@ public class SpringResourceLoader extends ResourceLoader {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputStream getResourceStream(String source) throws ResourceNotFoundException {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Looking for Velocity resource with name [" + source + "]");
|
||||
|
|
@ -113,10 +115,12 @@ public class SpringResourceLoader extends ResourceLoader {
|
|||
"Could not find resource [" + source + "] in Spring resource loader path");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSourceModified(Resource resource) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getLastModified(Resource resource) {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue