cleanup dev mode

This commit is contained in:
Lee
2024-06-30 04:13:54 +01:00
parent b7f2b6a3d7
commit 702aead53a
5 changed files with 41 additions and 3 deletions

View File

@ -27,7 +27,7 @@ public class ProfileHolder {
profiles = new HashMap<>();
}
Profile profile = profiles.values().stream().filter(p -> p.getClass().equals(clazz)).findFirst().orElse(null);
Profile profile = profiles.values().stream().filter(clazz::isInstance).findFirst().orElse(null);
if (profile == null) {
try {
profile = clazz.newInstance();