[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tm-cvs-commit] dmcknight org.eclipse.tm.rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files DefaultFileServiceCodePageConverter.java

Update of /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files
In directory dev2:/tmp/cvs-serv7043/src/org/eclipse/rse/services/files

Modified Files:
	DefaultFileServiceCodePageConverter.java 
Log Message:
[performance] DefaultFileServiceCodePageConverter is wasteful with main memory


Index: DefaultFileServiceCodePageConverter.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.tm.rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/DefaultFileServiceCodePageConverter.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** DefaultFileServiceCodePageConverter.java	14 Nov 2011 19:52:44 -0000	1.11
--- DefaultFileServiceCodePageConverter.java	20 Mar 2012 19:27:57 -0000	1.12
***************
*** 1,4 ****
  /********************************************************************************
!  * Copyright (c) 2007, 2011 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
--- 1,4 ----
  /********************************************************************************
!  * 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
***************
*** 96,99 ****
--- 96,103 ----
  					inputStream.close();	
  					outStream.close();
+ 					if(!altFile.renameTo(file) && file.exists()) {
+ 						file.delete();
+ 						altFile.renameTo(file);
+ 					}
  					altFile.renameTo(file);
  				}