[tycho/f17] Remove unneeded workaround for JSR14 incompatibility of JDK 1.7.

Roland Grunberg rgrunber at fedoraproject.org
Fri Aug 24 19:38:00 UTC 2012


commit fbb0a38308be189e54b770f1ec4866884ab4cd94
Author: Roland Grunberg <rgrunber at redhat.com>
Date:   Fri Aug 24 11:02:37 2012 -0400

    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.

 tycho-fix-build.patch |  109 ++++---------------------------------------------
 tycho.spec            |    1 +
 2 files changed, 9 insertions(+), 101 deletions(-)
---
diff --git a/tycho-fix-build.patch b/tycho-fix-build.patch
index ca0efe0..00e5fd7 100644
--- a/tycho-fix-build.patch
+++ b/tycho-fix-build.patch
@@ -1,24 +1,17 @@
-From b67b6a5ab67eea4cb69d259fb7140a54355df61d Mon Sep 17 00:00:00 2001
+From 048c43afbf54608f7f3bfccaff6b85ca72ea1348 Mon Sep 17 00:00:00 2001
 From: Roland Grunberg <rgrunber at redhat.com>
 Date: Tue, 12 Jun 2012 09:56:38 -0400
-Subject: [PATCH 1/4] Fix the Tycho build to work on Fedora.
+Subject: [PATCH 1/3] Fix the Tycho build to work 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.
-
 Change-Id: Ic8c0514c1fa10ee53580d2654ac6a363ccd66814
 ---
- pom.xml                                                      |  5 -----
- tycho-bundles/tycho-bundles-target/tycho.target              |  2 --
- tycho-compiler-jdt/pom.xml                                   |  4 ----
- .../java/org/eclipse/tycho/core/osgitools/OsgiManifest.java  | 12 ++++++------
- .../tycho/core/osgitools/StandalonePluginConverterTest.java  |  8 ++++----
- .../org/eclipse/tycho/testing/EmptyLifecycleExecutor.java    |  8 ++++++++
- 6 files changed, 18 insertions(+), 21 deletions(-)
+ pom.xml                                                           | 5 -----
+ tycho-bundles/tycho-bundles-target/tycho.target                   | 2 --
+ tycho-compiler-jdt/pom.xml                                        | 4 ----
+ .../java/org/eclipse/tycho/testing/EmptyLifecycleExecutor.java    | 8 ++++++++
+ 4 files changed, 8 insertions(+), 11 deletions(-)
 
 diff --git a/pom.xml b/pom.xml
 index 69e68c6..7cfb0cf 100644
@@ -64,92 +57,6 @@ index 9f7bdd7..6a1102b 100644
  			<groupId>org.codehaus.plexus</groupId>
  			<artifactId>plexus-compiler-api</artifactId>
  		</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/testing/EmptyLifecycleExecutor.java b/tycho-testing-harness/src/main/java/org/eclipse/tycho/testing/EmptyLifecycleExecutor.java
 index a9d80d3..3ddbe9c 100644
 --- a/tycho-testing-harness/src/main/java/org/eclipse/tycho/testing/EmptyLifecycleExecutor.java
@@ -170,5 +77,5 @@ index a9d80d3..3ddbe9c 100644
              throws PluginNotFoundException, PluginResolutionException, PluginDescriptorParsingException,
              MojoNotFoundException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException,
 -- 
-1.7.11.2
+1.7.11.4
 
diff --git a/tycho.spec b/tycho.spec
index 61fc3ac..969119c 100644
--- a/tycho.spec
+++ b/tycho.spec
@@ -185,6 +185,7 @@ install -pm 755 %{SOURCE3} $RPM_BUILD_ROOT%{_javadir}/%{name}/copy-platform-all
 %changelog
 * Fri Aug 24 2012 Roland Grunberg <rgrunber at redhat.com> 0.15.0-5.1
 - 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 22 2012 Roland Grunberg <rgrunber at redhat.com> 0.15.0-4.1
 - Fix local mode resolution bug.


More information about the scm-commits mailing list