mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[performance optimization] store service impl in holder
This commit is contained in:
@@ -29,7 +29,11 @@ public abstract class ScratchFileService {
|
||||
public enum Option { existing_only, create_if_missing, create_new_always }
|
||||
|
||||
public static ScratchFileService getInstance() {
|
||||
return ServiceManager.getService(ScratchFileService.class);
|
||||
return ServiceHolder.instance;
|
||||
}
|
||||
|
||||
private static class ServiceHolder {
|
||||
static final ScratchFileService instance = ServiceManager.getService(ScratchFileService.class);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user