1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 06:05:24 +02:00

[performance] DefaultFileServiceCodePageConverter is wasteful with main memory

This commit is contained in:
David McKnight 2012-03-20 19:27:57 +00:00
parent 31d2f1a186
commit 8f2332179b

View file

@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2007, 2011 IBM Corporation. All rights reserved.
* Copyright (c) 2007, 2012 IBM Corporation. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@ -95,6 +95,10 @@ public class DefaultFileServiceCodePageConverter implements
}
inputStream.close();
outStream.close();
if(!altFile.renameTo(file) && file.exists()) {
file.delete();
altFile.renameTo(file);
}
altFile.renameTo(file);
}