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 2812 Details for
Bug 28330
[resources] Visitor for history store is wrong
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch
resources_patch.txt (text/plain), 2.67 KB, created by
Debbie Wilson
on 2002-12-16 16:18:24 EST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Debbie Wilson
Created:
2002-12-16 16:18:24 EST
Size:
2.67 KB
patch
obsolete
>Index: src/org/eclipse/core/internal/localstore/HistoryStore.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/HistoryStore.java,v >retrieving revision 1.18 >diff -u -r1.18 HistoryStore.java >--- src/org/eclipse/core/internal/localstore/HistoryStore.java 16 Dec 2002 20:10:49 -0000 1.18 >+++ src/org/eclipse/core/internal/localstore/HistoryStore.java 16 Dec 2002 21:16:49 -0000 >@@ -10,15 +10,15 @@ > **********************************************************************/ > package org.eclipse.core.internal.localstore; > >-import org.eclipse.core.resources.*; >-import org.eclipse.core.runtime.*; >-import org.eclipse.core.internal.properties.IndexedStoreWrapper; >-import org.eclipse.core.internal.resources.*; >-import org.eclipse.core.internal.utils.*; >-import org.eclipse.core.internal.indexing.*; > import java.io.File; > import java.io.InputStream; > import java.util.*; >+import org.eclipse.core.internal.indexing.*; >+import org.eclipse.core.internal.properties.IndexedStoreWrapper; >+import org.eclipse.core.internal.resources.*; >+import org.eclipse.core.internal.utils.*; >+import org.eclipse.core.resources.*; >+import org.eclipse.core.runtime.*; > > public class HistoryStore { > protected Workspace workspace; >@@ -45,17 +45,31 @@ > cursor.find(key); > // Check for a prefix match. > while (cursor.keyMatches(key)) { >+ byte[] storedKey = cursor.getKey(); >+ >+ // visit if we have an exact match >+ if (storedKey.length - ILocalStoreConstants.SIZE_KEY_SUFFIX == key.length) { >+ HistoryStoreEntry storedEntry = HistoryStoreEntry.create(store, cursor); >+ if (!visitor.visit(storedEntry)) >+ break; >+ } >+ >+ // return if we aren't checking partial matches > if (!visitOnPartialMatch) { >- // Ensure key prefix is of correct length. >- byte[] storedKey = cursor.getKey(); >- if (storedKey.length - ILocalStoreConstants.SIZE_KEY_SUFFIX != key.length) { >- cursor.next(); >- continue; >- } >+ cursor.next(); >+ continue; >+ } >+ >+ // if the last character of the key is a path >+ // separator or if the next character in the match >+ // is a path separater then visit since it is a child >+ // based on path segment matching. >+ byte b = storedKey[key.length]; >+ if (key[key.length-1] == 47 || b == 47) { >+ HistoryStoreEntry storedEntry = HistoryStoreEntry.create(store, cursor); >+ if (!visitor.visit(storedEntry)) >+ break; > } >- HistoryStoreEntry storedEntry = HistoryStoreEntry.create(store, cursor); >- if (!visitor.visit(storedEntry)) >- break; > cursor.next(); > } > cursor.close();
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 28330
:
2810
|
2811
| 2812