mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Yet another victim of .substring() holds original string buffer.
This commit is contained in:
+3
-2
@@ -103,8 +103,9 @@ public class VirtualDirectoryImpl extends VirtualFileSystemEntry {
|
||||
// do not extract getId from under the synchronized block since it will cause a concurrency problem.
|
||||
int id = ourPersistence.getId(this, name);
|
||||
if (id > 0) {
|
||||
NewVirtualFile child = createChild(name, id);
|
||||
map.put(name, child);
|
||||
final String shorty = new String(name);
|
||||
NewVirtualFile child = createChild(shorty, id); // So we don't hold whole char[] buffer of a lengthy path
|
||||
map.put(shorty, child);
|
||||
return child;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user