do not access extensions too early

This commit is contained in:
Alexey Kudravtsev
2015-03-26 15:18:25 +03:00
parent 308e5295de
commit 2becd4ff4f
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -45,7 +45,10 @@ import java.util.*;
public class BasePathMacroManager extends PathMacroManager {
private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.components.impl.BasePathMacroManager");
private static final CompositePathMacroFilter FILTER = new CompositePathMacroFilter(Extensions.getExtensions(PathMacrosCollector.MACRO_FILTER_EXTENSION_POINT_NAME));
private static class Holder {
private static final CompositePathMacroFilter FILTER = new CompositePathMacroFilter(Extensions.getExtensions(PathMacrosCollector.MACRO_FILTER_EXTENSION_POINT_NAME));
}
private PathMacrosImpl myPathMacros;
@@ -188,7 +191,7 @@ public class BasePathMacroManager extends PathMacroManager {
@Override
public void collapsePaths(@NotNull final Element element) {
getReplacePathMap().substitute(element, SystemInfo.isFileSystemCaseSensitive, false, FILTER);
getReplacePathMap().substitute(element, SystemInfo.isFileSystemCaseSensitive, false, Holder.FILTER);
}
public int hashCode() {