Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Fusier2009-03-30 17:30:53 +0000
committerFrederic Fusier2009-03-30 17:30:53 +0000
commit9c226b64259ee6df08f388fdda3107eca6334b58 (patch)
tree7f25bad45a9380e605905c5d5334438c5a2d1078 /org.eclipse.jdt.core.tests.performance
parent72dc1c57c42de4a3dfb21c97d6b1a9b41be72bce (diff)
downloadeclipse.jdt.core-9c226b64259ee6df08f388fdda3107eca6334b58.tar.gz
eclipse.jdt.core-9c226b64259ee6df08f388fdda3107eca6334b58.tar.xz
eclipse.jdt.core-9c226b64259ee6df08f388fdda3107eca6334b58.zip
HEAD - 270409
Diffstat (limited to 'org.eclipse.jdt.core.tests.performance')
-rw-r--r--org.eclipse.jdt.core.tests.performance/src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceTests.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/org.eclipse.jdt.core.tests.performance/src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceTests.java b/org.eclipse.jdt.core.tests.performance/src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceTests.java
index a5c5fb6b4b..84327af417 100644
--- a/org.eclipse.jdt.core.tests.performance/src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceTests.java
+++ b/org.eclipse.jdt.core.tests.performance/src/org/eclipse/jdt/core/tests/performance/FullSourceWorkspaceTests.java
@@ -643,13 +643,17 @@ public abstract class FullSourceWorkspaceTests extends TestCase {
System.out.println("("+(System.currentTimeMillis()-start)+"ms)");
// Create lib entries for the JDKs
+ String jreLibPath = JavaCore.getClasspathVariable("JRE_LIB").toOSString();
System.out.print("Create lib entries for the JDKs...");
start = System.currentTimeMillis();
String[] jdkLibs = Util.getJavaClassLibs();
int jdkLibsLength = jdkLibs.length;
IClasspathEntry[] jdkEntries = new IClasspathEntry[jdkLibsLength];
+ int jdkEntriesCount = 0;
for (int i=0; i<jdkLibsLength; i++) {
- jdkEntries[i] = JavaCore.newLibraryEntry(new Path(jdkLibs[i]), null, null);
+ if (!jdkLibs[i].equals(jreLibPath)) { // do not include JRE_LIB in additional JDK entries
+ jdkEntries[jdkEntriesCount++] = JavaCore.newLibraryEntry(new Path(jdkLibs[i]), null, null);
+ }
}
System.out.println(jdkLibsLength+" found ("+(System.currentTimeMillis()-start)+"ms)");
@@ -670,9 +674,9 @@ public abstract class FullSourceWorkspaceTests extends TestCase {
// Set jdk jars onto the project classpath
IClasspathEntry[] entries = ALL_PROJECTS[i].getRawClasspath();
int entriesLength = entries.length;
- if (!entries[0].equals(jdkEntries[0])) {
- System.arraycopy(entries, 0, entries = new IClasspathEntry[jdkLibsLength+entriesLength], jdkLibsLength, entriesLength);
- System.arraycopy(jdkEntries, 0, entries, 0, jdkLibsLength);
+ if (!entries[entriesLength-1].equals(jdkEntries[jdkEntriesCount-1])) {
+ System.arraycopy(entries, 0, entries = new IClasspathEntry[jdkEntriesCount+entriesLength], 0, entriesLength);
+ System.arraycopy(jdkEntries, 0, entries, entriesLength, jdkEntriesCount);
ALL_PROJECTS[i].setRawClasspath(entries, null);
}

Back to the top