Don't keep Interner instance around after collecting resources
This commit is contained in:
parent
e724c4dfb1
commit
e4d3ffbac1
|
|
@ -39,10 +39,10 @@ public class ModernFixResourceFinder {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private static final Interner<String> PATH_INTERNER = Interners.newStrongInterner();
|
|
||||||
|
|
||||||
public static synchronized void init() throws ReflectiveOperationException {
|
public static synchronized void init() throws ReflectiveOperationException {
|
||||||
urlsForClass = new HashMap<>();
|
urlsForClass = new HashMap<>();
|
||||||
|
Interner<String> pathInterner = Interners.newStrongInterner();
|
||||||
//LOGGER.info("Start building list of class locations...");
|
//LOGGER.info("Start building list of class locations...");
|
||||||
for(ModFileInfo fileInfo : LoadingModList.get().getModFiles()) {
|
for(ModFileInfo fileInfo : LoadingModList.get().getModFiles()) {
|
||||||
ModFile file = fileInfo.getFile();
|
ModFile file = fileInfo.getFile();
|
||||||
|
|
@ -56,7 +56,7 @@ public class ModernFixResourceFinder {
|
||||||
.map(root::relativize)
|
.map(root::relativize)
|
||||||
.forEach(path -> {
|
.forEach(path -> {
|
||||||
String strPath = path.toString();
|
String strPath = path.toString();
|
||||||
Pair<String, String> pathPair = Pair.of(fileInfo.getMods().get(0).getModId(), PATH_INTERNER.intern(strPath));
|
Pair<String, String> pathPair = Pair.of(fileInfo.getMods().get(0).getModId(), pathInterner.intern(strPath));
|
||||||
List<Pair<String, String>> urlList = urlsForClass.get(strPath);
|
List<Pair<String, String>> urlList = urlsForClass.get(strPath);
|
||||||
if(urlList != null) {
|
if(urlList != null) {
|
||||||
if(urlList.size() > 1)
|
if(urlList.size() > 1)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user