Fix WEManager (#1487)

* Fix WeManager?

* Fix WeManager?

* Also register WEManager if not available, like TaskManager.
This commit is contained in:
Aurélien 2021-12-23 12:39:11 +01:00 committed by GitHub
parent 7da921e075
commit ca5ad58f01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,7 @@ public class WEManager {
* @deprecated Use {@link #weManager()} instead.
*/
@Deprecated(forRemoval = true, since = "2.0.0")
private final WEManager IMP = new WEManager();
public static WEManager IMP = new WEManager();
private final ArrayDeque<FaweMaskManager> managers = new ArrayDeque<>();
private WEManager() {
@ -45,6 +45,9 @@ public class WEManager {
* @return an instance of the WEManager
*/
public static WEManager weManager() {
if (INSTANCE == null) {
INSTANCE = new WEManager();
}
return INSTANCE;
}