Clean up warnings and polishing

This commit is contained in:
Sam Brannen
2022-07-31 14:14:56 +03:00
parent 9d1e9703ae
commit e4395f2f8b
55 changed files with 412 additions and 396 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2022 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.
@@ -23,7 +23,6 @@ import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.AsyncResult;
/**
* @author Mark Fisher
@@ -52,8 +51,9 @@ public class AutowiredQualifierFooService implements FooService {
}
@Override
@SuppressWarnings("deprecation")
public Future<String> asyncFoo(int id) {
return new AsyncResult<>(this.fooDao.findFoo(id));
return new org.springframework.scheduling.annotation.AsyncResult<>(this.fooDao.findFoo(id));
}
@Override

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2021 the original author or authors.
* Copyright 2002-2022 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.
@@ -35,7 +35,6 @@ import org.springframework.context.annotation.Lazy;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.core.io.ResourceLoader;
import org.springframework.core.io.support.ResourcePatternResolver;
import org.springframework.scheduling.annotation.AsyncResult;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;
@@ -92,10 +91,11 @@ public abstract class FooServiceImpl implements FooService {
}
@Override
@SuppressWarnings("deprecation")
public Future<String> asyncFoo(int id) {
System.out.println(Thread.currentThread().getName());
Assert.state(ServiceInvocationCounter.getThreadLocalCount() != null, "Thread-local counter not exposed");
return new AsyncResult<>(fooDao().findFoo(id));
return new org.springframework.scheduling.annotation.AsyncResult<>(fooDao().findFoo(id));
}
@Override

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2022 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.
@@ -19,7 +19,6 @@ package example.scannable;
import java.util.concurrent.Future;
import org.springframework.context.annotation.Scope;
import org.springframework.scheduling.annotation.AsyncResult;
/**
* @author Mark Fisher
@@ -34,8 +33,9 @@ public class ScopedProxyTestBean implements FooService {
}
@Override
@SuppressWarnings("deprecation")
public Future<String> asyncFoo(int id) {
return new AsyncResult<>("bar");
return new org.springframework.scheduling.annotation.AsyncResult<>("bar");
}
@Override