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-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