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 195872 Details for
Bug 345547
[Backport] ObjectNotFoundException prevents opening workspace
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.
[patch]
Patch
patch345547.txt (text/plain), 3.21 KB, created by
Szymon Ptaszkiewicz
on 2011-05-17 11:11:32 EDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Szymon Ptaszkiewicz
Created:
2011-05-17 11:11:32 EDT
Size:
3.21 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.core.resources >Index: src/org/eclipse/core/internal/resources/SaveManager.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/SaveManager.java,v >retrieving revision 1.96.2.1 >diff -u -r1.96.2.1 SaveManager.java >--- src/org/eclipse/core/internal/resources/SaveManager.java 13 Nov 2009 09:26:00 -0000 1.96.2.1 >+++ src/org/eclipse/core/internal/resources/SaveManager.java 17 May 2011 15:06:07 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2009 IBM Corporation and others. >+ * Copyright (c) 2000, 2011 IBM Corporation and others. > * 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 >@@ -23,6 +23,30 @@ > import org.eclipse.osgi.util.NLS; > > public class SaveManager implements IElementInfoFlattener, IManager, IStringPoolParticipant { >+ class MasterTable extends Properties { >+ private static final long serialVersionUID = 1L; >+ >+ /* (non-Javadoc) >+ * @see java.util.Hashtable#put(java.lang.Object, java.lang.Object) >+ */ >+ public synchronized Object put(Object key, Object value) { >+ Object prev = super.put(key, value); >+ if (prev != null && ROOT_SEQUENCE_NUMBER_KEY.equals(key)) { >+ int prevSeqNum = new Integer((String) prev).intValue(); >+ int currSeqNum = new Integer((String) value).intValue(); >+ if (prevSeqNum > currSeqNum) { >+ //revert last put operation >+ super.put(key, prev); >+ //notify about the problem, do not throw exception but add the exception to know where it occurred >+ String message = "Cannot set lower sequence number for root (previous: " + prevSeqNum + ", new: " + currSeqNum + "). Ignoring the new value."; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ >+ Policy.log(new Status(IStatus.ERROR, ResourcesPlugin.PI_RESOURCES, IResourceStatus.INTERNAL_ERROR, message, new IllegalArgumentException(message))); >+ } >+ } >+ return prev; >+ } >+ } >+ >+ protected static final String ROOT_SEQUENCE_NUMBER_KEY = Path.ROOT.toString() + LocalMetaArea.F_TREE; > protected static final String CLEAR_DELTA_PREFIX = "clearDelta_"; //$NON-NLS-1$ > protected static final String DELTA_EXPIRATION_PREFIX = "deltaExpiration_"; //$NON-NLS-1$ > protected static final int DONE_SAVING = 3; >@@ -44,7 +68,7 @@ > protected static final String SAVE_NUMBER_PREFIX = "saveNumber_"; //$NON-NLS-1$ > protected static final int SAVING = 2; > protected ElementTree lastSnap; >- protected Properties masterTable; >+ protected MasterTable masterTable; > > /** > * A flag indicating that a save operation is occurring. This is a signal >@@ -738,7 +762,7 @@ > > protected void restoreMasterTable() throws CoreException { > long start = System.currentTimeMillis(); >- masterTable = new Properties(); >+ masterTable = new MasterTable(); > IPath location = workspace.getMetaArea().getSafeTableLocationFor(ResourcesPlugin.PI_RESOURCES); > java.io.File target = location.toFile(); > if (!target.exists()) {
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 345547
: 195872