diff options
author | Jayaprakash Arthanareeswaran | 2012-08-07 12:50:35 +0000 |
---|---|---|
committer | Jayaprakash Arthanareeswaran | 2012-08-10 07:04:07 +0000 |
commit | c7283b6ce6bbd6b0a53e2894787315a37f65e88f (patch) | |
tree | 5aa569d98a30cfa1d426ad1dbf9605372ef3730e | |
parent | 0b42d143912eb32b44ad57c2dbfecbd29a7f1da6 (diff) | |
download | eclipse.jdt.core-c7283b6ce6bbd6b0a53e2894787315a37f65e88f.tar.gz eclipse.jdt.core-c7283b6ce6bbd6b0a53e2894787315a37f65e88f.tar.xz eclipse.jdt.core-c7283b6ce6bbd6b0a53e2894787315a37f65e88f.zip |
Fix for bug 386318: Support the new compiler.version format, which is
automatically created
3 files changed, 15 insertions, 7 deletions
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/junit/extension/TestCase.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/junit/extension/TestCase.java index 82acc8c05f..eeffbcc768 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/junit/extension/TestCase.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/junit/extension/TestCase.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2010 IBM Corporation and others. + * Copyright (c) 2000, 2012 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 @@ -76,10 +76,18 @@ public class TestCase extends PerformanceTestCase { break; case RANDOM_ORDER_JDT: String version = new Main(null/*outWriter*/, null/*errWriter*/, false/*systemExit*/, null/*options*/, null/*progress*/).bind("compiler.version"); + version = version.substring(0, version.indexOf(',')); try { - String v_number = version.substring(2, 5); - ordering = Long.parseLong(v_number); - System.err.println("Note that tests will be run in random order using seed="+v_number+" (ie. JDT/Core version)"); + // https://bugs.eclipse.org/bugs/show_bug.cgi?id=384531 + // compiler.version is a timestamp since the the above fix (of the format: v20120725-181921) + StringBuffer buffer = new StringBuffer(); + for (int i = 0; i < version.length(); i++) { + if (Character.isDigit(version.charAt(i))) { + buffer.append(version.charAt(i)); + } + } + ordering = Long.parseLong(buffer.toString()); + System.err.println("Note that tests will be run in random order using seed="+ordering+" (ie. JDT/Core version)"); } catch (NumberFormatException nfe) { System.err.println("Cannot extract valid JDT/Core version number from 'compiler.version': "+version+" => no order will be finally used..."); diff --git a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties index 90b61844c6..0812503728 100644 --- a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties +++ b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties @@ -22,7 +22,7 @@ #Format: compiler.name = word1 word2 word3 compiler.name = Eclipse Compiler for Java(TM) #Format: compiler.version = (The placeholder 'bundle_qualifier' will be automatically filled. Do not remove or alter it) -compiler.version = 3.9.0.bundle_qualifier +compiler.version = bundle_qualifier, 3.9.0 compiler.copyright = Copyright IBM Corp 2000, 2012. All rights reserved. ### progress diff --git a/org.eclipse.jdt.core/scripts/export-ecj.xml b/org.eclipse.jdt.core/scripts/export-ecj.xml index e47456cdcd..212a34862c 100644 --- a/org.eclipse.jdt.core/scripts/export-ecj.xml +++ b/org.eclipse.jdt.core/scripts/export-ecj.xml @@ -15,7 +15,7 @@ <project name="Eclipse Batch Compiler" default="export-all" basedir=".."> <target name="init"> <tstamp/> - <property name="bundleVersion" value="3.8.0.qualifier"/> + <property name="bundleVersion" value="3.9.0.qualifier"/> <fail unless="bundleVersion" message="Property 'bundleVersion' must be provided by caller"/> <condition property="bundleVersionOK"> <matches pattern="\d\.\d\.\d.*" string="${bundleVersion}"/> @@ -38,6 +38,7 @@ <target name="extract-batch-compiler" depends="init"> <property name="target.folder" value="${basedir}/bin"/> + <replace file="${basedir}/bin/org/eclipse/jdt/internal/compiler/batch/messages.properties" token="bundle_qualifier" value="${bundleVersionQualifer}"/> <echo message="Extract .class file and properties for the batch compiler" /> <copy todir="${ecj-temp-folder}"> <fileset dir="${target.folder}"> @@ -58,7 +59,6 @@ <exclude name="org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter*.class"/> </fileset> </copy> - <replace file="${ecj-temp-folder}/org/eclipse/jdt/internal/compiler/batch/messages.properties" token="bundle_qualifier" value="${bundleVersionQualifer}"/> </target> <target name="extract-_jsr199" depends="init"> |