Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 198200 Details for
Bug 259981
Numerous outdated bundledata/configuration files created in equinox stack
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
diff file to change from original to my version
diff.txt (text/plain), 2.88 KB, created by
tomhsu
on 2011-06-17 13:42:28 EDT
(
hide
)
Description:
diff file to change from original to my version
Filename:
MIME Type:
Creator:
tomhsu
Created:
2011-06-17 13:42:28 EDT
Size:
2.88 KB
patch
obsolete
>557a558,568 >> //Tom Modification >> if (openCleanup) { >> try { >> cleanupWithLock(); >> } catch (IOException ex) { >> // If IOException is thrown from our custom method. >> // log and swallow for now. >> System.out.println("Unexpected IOException is thrown inside cleanupWithLock. Please look below for stacktrace"); >> ex.printStackTrace(System.out); >> } >> } >560a572,620 >> private void cleanupWithLock() throws IOException { >> if (readOnly) >> return; >> //Iterate through the temp files and delete them all, except the one representing this storage manager. >> String[] files = managerRoot.list(); >> if (files != null) { >> for (int i = 0; i < files.length; i++) { >> if (files[i].endsWith(".instance") && instanceFile != null && !files[i].equalsIgnoreCase(instanceFile.getName())) { //$NON-NLS-1$ >> Locker tmpLocker = BasicLocation.createLocker(new File(managerRoot, files[i]), lockMode); >> if (tmpLocker.lock()) { >> //If I can lock it is a file that has been left behind by a crash >> tmpLocker.release(); >> new File(managerRoot, files[i]).delete(); >> } else { >> tmpLocker.release(); >> return; //The file is still being locked by somebody else >> } >> } >> } >> } >> >> //If we are here it is because we are the last instance running. After locking the table and getting its latest content, remove all the backup files and change the table >> updateTable(); >> Collection managedFiles = table.entrySet(); >> for (Iterator iter = managedFiles.iterator(); iter.hasNext();) { >> Map.Entry fileEntry = (Map.Entry) iter.next(); >> String fileName = (String) fileEntry.getKey(); >> Entry info = (Entry) fileEntry.getValue(); >> if (info.getFileType() == FILETYPE_RELIABLEFILE) { >> ReliableFile.cleanupGenerations(new File(base, fileName)); >> } else { >> //Because we are cleaning up, we are giving up the values from our table, and we must delete all the files that are not referenced by the table >> String readId = Integer.toString(info.getWriteId() - 1); >> deleteCopies(fileName, readId); >> } >> } >> >> if (tempCleanup) { >> files = base.list(); >> if (files != null) { >> for (int i = 0; i < files.length; i++) { >> if (files[i].endsWith(ReliableFile.tmpExt)) { >> new File(base, files[i]).delete(); >> } >> } >> } >> } >> } >> >919c979 >< } >\ No newline at end of file >--- >> }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
tjwatson
:
iplog+
Actions:
View
Attachments on
bug 259981
:
132641
|
198199
| 198200 |
198334
|
199147