Remove unneeded workaround for JSR14 incompatibility of JDK 1.7.
Fedora Eclipse now compiles all JSR14 upstream bundles with a target of 1.5, allowing us to leave in place parts of Tycho code that use those particular libraries with generics.
This commit is contained in:
parent
ba49332349
commit
050d5c3c87
@ -1,30 +1,23 @@
|
|||||||
From 2ddba330f84d010cb462848c3686d084667091ec Mon Sep 17 00:00:00 2001
|
From 19866503693224e992e2c3caa0b0c978bfe9aee5 Mon Sep 17 00:00:00 2001
|
||||||
From: Roland Grunberg <rgrunber@redhat.com>
|
From: Roland Grunberg <rgrunber@redhat.com>
|
||||||
Date: Tue, 12 Jun 2012 09:56:38 -0400
|
Date: Tue, 12 Jun 2012 09:56:38 -0400
|
||||||
Subject: [PATCH 1/4] Fix the Tycho build to work on Fedora.
|
Subject: [PATCH] Fix the Tycho build to work on Fedora.
|
||||||
|
|
||||||
Minor fixes of limited scope needed to have Tycho building on Fedora.
|
Minor fixes of limited scope needed to have Tycho building on Fedora.
|
||||||
|
|
||||||
As of Fedora 17, the default JRE is JDK 1.7. This does not support
|
|
||||||
JSR14. Many Eclipse OSGi bundles use JSR14 for a build target but since
|
|
||||||
JDK 1.7 ignores certain information (eg. generics) we must be careful
|
|
||||||
when using those libraries.
|
|
||||||
|
|
||||||
Remove org.eclipse.equinox.concurrent until present in Fedora Eclipse.
|
Remove org.eclipse.equinox.concurrent until present in Fedora Eclipse.
|
||||||
|
|
||||||
Change-Id: Ic8c0514c1fa10ee53580d2654ac6a363ccd66814
|
Change-Id: Ic8c0514c1fa10ee53580d2654ac6a363ccd66814
|
||||||
---
|
---
|
||||||
pom.xml | 5 -----
|
pom.xml | 5 -----
|
||||||
tycho-artifactcomparator/pom.xml | 4 ++--
|
tycho-artifactcomparator/pom.xml | 4 ++--
|
||||||
.../tycho-bundles-external/tycho-bundles-external.product | 1 -
|
.../tycho-bundles-external/tycho-bundles-external.product | 1 -
|
||||||
tycho-bundles/tycho-bundles-target/tycho.target | 4 ----
|
tycho-bundles/tycho-bundles-target/tycho.target | 4 ----
|
||||||
.../tycho-standalone-p2-director/p2 Director.product | 1 -
|
.../tycho-standalone-p2-director/p2 Director.product | 1 -
|
||||||
tycho-compiler-jdt/pom.xml | 4 ----
|
tycho-compiler-jdt/pom.xml | 4 ----
|
||||||
.../java/org/eclipse/tycho/core/osgitools/OsgiManifest.java | 12 ++++++------
|
.../org/eclipse/tycho/test/AbstractTychoIntegrationTest.java | 11 +++++------
|
||||||
.../tycho/core/osgitools/StandalonePluginConverterTest.java | 8 ++++----
|
.../org/eclipse/tycho/testing/EmptyLifecycleExecutor.java | 8 ++++++++
|
||||||
.../org/eclipse/tycho/test/AbstractTychoIntegrationTest.java | 11 +++++------
|
8 files changed, 15 insertions(+), 23 deletions(-)
|
||||||
.../org/eclipse/tycho/testing/EmptyLifecycleExecutor.java | 8 ++++++++
|
|
||||||
10 files changed, 25 insertions(+), 33 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pom.xml b/pom.xml
|
diff --git a/pom.xml b/pom.xml
|
||||||
index dc7c1f5..1868f9a 100644
|
index dc7c1f5..1868f9a 100644
|
||||||
@ -116,92 +109,6 @@ index 01b9a9e..c373e6a 100644
|
|||||||
<groupId>org.codehaus.plexus</groupId>
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
<artifactId>plexus-compiler-api</artifactId>
|
<artifactId>plexus-compiler-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiManifest.java b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiManifest.java
|
|
||||||
index 2859ab7..993cc58 100644
|
|
||||||
--- a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiManifest.java
|
|
||||||
+++ b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiManifest.java
|
|
||||||
@@ -25,7 +25,7 @@ public class OsgiManifest {
|
|
||||||
private static final ExecutionEnvironment[] EMPTY_EXEC_ENV = new ExecutionEnvironment[0];
|
|
||||||
|
|
||||||
private String location;
|
|
||||||
- private Headers<String, String> headers;
|
|
||||||
+ private Headers headers;
|
|
||||||
|
|
||||||
// cache for parsed values of commonly used headers
|
|
||||||
private String bundleSymbolicName;
|
|
||||||
@@ -78,7 +78,7 @@ public class OsgiManifest {
|
|
||||||
}
|
|
||||||
|
|
||||||
private String parseMandatoryFirstValue(String headerKey) throws InvalidOSGiManifestException {
|
|
||||||
- String value = headers.get(headerKey);
|
|
||||||
+ String value = (String)headers.get(headerKey);
|
|
||||||
if (value == null) {
|
|
||||||
throw new InvalidOSGiManifestException(location, "MANIFEST header '" + headerKey + "' not found");
|
|
||||||
}
|
|
||||||
@@ -100,12 +100,12 @@ public class OsgiManifest {
|
|
||||||
&& "dir".equals(bundleShapeElements[0].getValue());
|
|
||||||
}
|
|
||||||
|
|
||||||
- public Headers<String, String> getHeaders() {
|
|
||||||
+ public Headers getHeaders() {
|
|
||||||
return headers;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getValue(String key) {
|
|
||||||
- return headers.get(key);
|
|
||||||
+ return (String)headers.get(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBundleSymbolicName() {
|
|
||||||
@@ -141,7 +141,7 @@ public class OsgiManifest {
|
|
||||||
}
|
|
||||||
|
|
||||||
private ManifestElement[] parseHeader(String key) {
|
|
||||||
- String value = headers.get(key);
|
|
||||||
+ String value = (String)headers.get(key);
|
|
||||||
if (value == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
@@ -154,7 +154,7 @@ public class OsgiManifest {
|
|
||||||
|
|
||||||
public ManifestElement[] getManifestElements(String key) throws OsgiManifestParserException {
|
|
||||||
try {
|
|
||||||
- return ManifestElement.parseHeader(key, headers.get(key));
|
|
||||||
+ return ManifestElement.parseHeader(key, (String)headers.get(key));
|
|
||||||
} catch (BundleException e) {
|
|
||||||
throw new OsgiManifestParserException(location, e);
|
|
||||||
}
|
|
||||||
diff --git a/tycho-core/src/test/java/org/eclipse/tycho/core/osgitools/StandalonePluginConverterTest.java b/tycho-core/src/test/java/org/eclipse/tycho/core/osgitools/StandalonePluginConverterTest.java
|
|
||||||
index 42db7f6..a145c57 100644
|
|
||||||
--- a/tycho-core/src/test/java/org/eclipse/tycho/core/osgitools/StandalonePluginConverterTest.java
|
|
||||||
+++ b/tycho-core/src/test/java/org/eclipse/tycho/core/osgitools/StandalonePluginConverterTest.java
|
|
||||||
@@ -36,7 +36,7 @@ public class StandalonePluginConverterTest {
|
|
||||||
converter.convertManifest(new File("src/test/resources/targetplatforms/pre-3.0/plugins/testjar_1.0.0.jar"), mf,
|
|
||||||
false, "3.2", true, null);
|
|
||||||
Assert.assertTrue(mf.isFile());
|
|
||||||
- Headers<String, String> headers = Headers.parseManifest(new FileInputStream(mf));
|
|
||||||
+ Headers headers = Headers.parseManifest(new FileInputStream(mf));
|
|
||||||
Assert.assertEquals("testjar", headers.get("Bundle-SymbolicName"));
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -44,14 +44,14 @@ public class StandalonePluginConverterTest {
|
|
||||||
public void testWriteManifest() throws PluginConversionException, BundleException, IOException {
|
|
||||||
File tmpManifestFile = folder.newFile("testManifest");
|
|
||||||
Hashtable<String, String> manifestToWrite = new Hashtable<String, String>();
|
|
||||||
- Headers<String, String> originalManifest = Headers.parseManifest(getClass().getResourceAsStream(
|
|
||||||
+ Headers originalManifest = Headers.parseManifest(getClass().getResourceAsStream(
|
|
||||||
"/manifests/valid.mf"));
|
|
||||||
for (Enumeration<String> keys = originalManifest.keys(); keys.hasMoreElements();) {
|
|
||||||
String key = keys.nextElement();
|
|
||||||
- manifestToWrite.put(key, originalManifest.get(key));
|
|
||||||
+ manifestToWrite.put(key, (String)originalManifest.get(key));
|
|
||||||
}
|
|
||||||
converter.writeManifest(tmpManifestFile, manifestToWrite, false);
|
|
||||||
- Headers<String, String> writtenManifest = Headers.parseManifest(new FileInputStream(tmpManifestFile));
|
|
||||||
+ Headers writtenManifest = Headers.parseManifest(new FileInputStream(tmpManifestFile));
|
|
||||||
assertEquals(originalManifest.size(), writtenManifest.size());
|
|
||||||
for (Enumeration<String> keys = writtenManifest.keys(); keys.hasMoreElements();) {
|
|
||||||
String key = keys.nextElement();
|
|
||||||
diff --git a/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java b/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java
|
diff --git a/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java b/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java
|
||||||
index 5c4dcb3..9830aee 100644
|
index 5c4dcb3..9830aee 100644
|
||||||
--- a/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java
|
--- a/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java
|
||||||
@ -244,5 +151,5 @@ index a9d80d3..3ddbe9c 100644
|
|||||||
throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
|
throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
|
||||||
MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException,
|
MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException,
|
||||||
--
|
--
|
||||||
1.7.11.2
|
1.7.11.4
|
||||||
|
|
||||||
|
@ -193,6 +193,7 @@ install -pm 755 %{SOURCE3} $RPM_BUILD_ROOT%{_javadir}/%{name}/copy-platform-all
|
|||||||
%changelog
|
%changelog
|
||||||
* Thu Aug 23 2012 Roland Grunberg <rgrunber@redhat.com> 0.16.0-5.1.df2c35
|
* Thu Aug 23 2012 Roland Grunberg <rgrunber@redhat.com> 0.16.0-5.1.df2c35
|
||||||
- Set BREE to at least JavaSE-1.6 for all eclipse packaging types.
|
- Set BREE to at least JavaSE-1.6 for all eclipse packaging types.
|
||||||
|
- Remove unneeded workaround for JSR14 incompatibility of JDK 1.7.
|
||||||
|
|
||||||
* Wed Aug 15 2012 Roland Grunberg <rgrunber@redhat.com> 0.16.0-5.df2c35
|
* Wed Aug 15 2012 Roland Grunberg <rgrunber@redhat.com> 0.16.0-5.df2c35
|
||||||
- Non-bootstrap build.
|
- Non-bootstrap build.
|
||||||
|
Loading…
Reference in New Issue
Block a user