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 74171 Details for
Bug 197179
2 Analysis Histories had the same IDs
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
HistoryID.txt (text/plain), 2.14 KB, created by
Mohammed Mostafa
on 2007-07-19 13:42:13 EDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Mohammed Mostafa
Created:
2007-07-19 13:42:13 EDT
Size:
2.14 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.tptp.platform.analysis.core >Index: src/org/eclipse/tptp/platform/analysis/core/history/AnalysisHistory.java >=================================================================== >RCS file: /cvsroot/raa/tptp/org.eclipse.tptp.platform.analysis.core/src/org/eclipse/tptp/platform/analysis/core/history/AnalysisHistory.java,v >retrieving revision 1.3 >diff -u -r1.3 AnalysisHistory.java >--- src/org/eclipse/tptp/platform/analysis/core/history/AnalysisHistory.java 27 Jun 2007 20:14:50 -0000 1.3 >+++ src/org/eclipse/tptp/platform/analysis/core/history/AnalysisHistory.java 19 Jul 2007 17:24:24 -0000 >@@ -18,7 +18,6 @@ > import java.util.List; > import java.util.Map; > >-import org.eclipse.tptp.platform.analysis.core.AnalysisConstants; > import org.eclipse.tptp.platform.analysis.core.CoreMessages; > import org.eclipse.tptp.platform.analysis.core.element.AbstractAnalysisElement; > import org.eclipse.tptp.platform.analysis.core.result.AbstractAnalysisResult; >@@ -55,6 +54,28 @@ > private static final DateFormat df = new SimpleDateFormat( CoreMessages.history_timestamp_format ); > > >+ private final static class Counter { >+ private int value ; >+ public Counter(int value){ >+ this.value = value; >+ } >+ public int getIntValue(){ >+ return value; >+ } >+ public void increaseValue(){ >+ value++; >+ } >+ public void decreaseValue(){ >+ value--; >+ } >+ } >+ >+ static final private Counter counter; >+ >+ static { >+ counter = new Counter(0); >+ } >+ > /** > * Construct a new analysis history for the specified configuration > * >@@ -66,7 +87,13 @@ > public AnalysisHistory( AnalysisHistoryFactory factoryValue, String configValue ) > { > historyTimestamp = System.currentTimeMillis(); >- historyId=AnalysisConstants.BLANK + historyTimestamp; >+ >+ // make sure that no 2 histories will have the same ID >+ synchronized (counter) { >+ counter.increaseValue(); >+ historyId= Integer.toString(counter.getIntValue()); >+ } >+ > selectedElements = new ArrayList(10); > selectAnalysisElements = new ArrayList(10); > this.configName = configValue;
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 197179
: 74171