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:
parent
31d2f1a186
commit
8f2332179b
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue