[pkg-java] r15315 - in trunk/libcommons-discovery-java/debian: . patches

Damien Raude-Morvan drazzib at alioth.debian.org
Tue Nov 1 14:41:14 UTC 2011


Author: drazzib
Date: 2011-11-01 14:41:14 +0000 (Tue, 01 Nov 2011)
New Revision: 15315

Added:
   trunk/libcommons-discovery-java/debian/patches/java6_incompatible_types.diff
   trunk/libcommons-discovery-java/debian/patches/java6_incompatible_types_tests.diff
   trunk/libcommons-discovery-java/debian/patches/series
Removed:
   trunk/libcommons-discovery-java/debian/patches/0001-set-source-and-target-version-1.5.patch
   trunk/libcommons-discovery-java/debian/patches/series
Modified:
   trunk/libcommons-discovery-java/debian/changelog
   trunk/libcommons-discovery-java/debian/maven.properties
Log:
* Team upload.
* d/patches/java6_incompatible_types{,_tests}.diff: Fix FTBFS on openjdk-6.
  depends on a runtime (Java Policy).
* d/patches/0001-set-source-and-target-version-1.5.patch: Dropped.
* d/maven.properties: Set source and target for javac to 1.5.

Modified: trunk/libcommons-discovery-java/debian/changelog
===================================================================
--- trunk/libcommons-discovery-java/debian/changelog	2011-11-01 04:14:51 UTC (rev 15314)
+++ trunk/libcommons-discovery-java/debian/changelog	2011-11-01 14:41:14 UTC (rev 15315)
@@ -1,10 +1,13 @@
-libcommons-discovery-java (0.5-1) UNRELEASED; urgency=low
+libcommons-discovery-java (0.5-1) unstable; urgency=low
 
-  * Team upload BUT FTBFS SOURCE
+  * Team upload.
 
   [ Damien Raude-Morvan ]
+  * d/patches/java6_incompatible_types{,_tests}.diff: Fix FTBFS on openjdk-6.
   * d/control: Drop Depends on any JRE as a Java library don't need to
-    depends on a runtime (Java Policy)
+    depends on a runtime (Java Policy).
+  * d/patches/0001-set-source-and-target-version-1.5.patch: Dropped.
+  * d/maven.properties: Set source and target for javac to 1.5.
 
   [ Torsten Werner ]
   * Update Standards-Version: 3.9.2.
@@ -14,7 +17,7 @@
   * Drop old patch which is not needed anymore.
   * Update debian/watch to create orig tarball from upstreams svn repository.
 
- -- Torsten Werner <twerner at debian.org>  Mon, 19 Sep 2011 23:25:59 +0200
+ -- Damien Raude-Morvan <drazzib at debian.org>  Tue, 01 Nov 2011 15:14:06 +0100
 
 libcommons-discovery-java (0.4-4) unstable; urgency=low
 

Modified: trunk/libcommons-discovery-java/debian/maven.properties
===================================================================
--- trunk/libcommons-discovery-java/debian/maven.properties	2011-11-01 04:14:51 UTC (rev 15314)
+++ trunk/libcommons-discovery-java/debian/maven.properties	2011-11-01 14:41:14 UTC (rev 15315)
@@ -2,3 +2,6 @@
 # For example:
 # maven.test.skip=true
 
+maven.compiler.source=1.5
+maven.compiler.target=1.5
+

Deleted: trunk/libcommons-discovery-java/debian/patches/0001-set-source-and-target-version-1.5.patch
===================================================================
--- trunk/libcommons-discovery-java/debian/patches/0001-set-source-and-target-version-1.5.patch	2011-11-01 04:14:51 UTC (rev 15314)
+++ trunk/libcommons-discovery-java/debian/patches/0001-set-source-and-target-version-1.5.patch	2011-11-01 14:41:14 UTC (rev 15315)
@@ -1,28 +0,0 @@
-From: Torsten Werner <twerner at debian.org>
-Date: Mon, 19 Sep 2011 23:32:02 +0200
-Subject: set source and target version 1.5
-
----
- pom.xml |    8 ++++++++
- 1 files changed, 8 insertions(+), 0 deletions(-)
-
-diff --git a/pom.xml b/pom.xml
-index 0d105c7..d5a55a0 100644
---- a/pom.xml
-+++ b/pom.xml
-@@ -160,6 +160,14 @@
-           </configuration>
-         </plugin>
-         <plugin>
-+          <groupId>org.apache.maven.plugins</groupId>
-+          <artifactId>maven-compiler-plugin</artifactId>
-+          <configuration>
-+            <source>1.5</source>
-+            <target>1.5</target>
-+          </configuration>
-+        </plugin>
-+        <plugin>
-           <artifactId>maven-assembly-plugin</artifactId>
-           <executions>
-             <execution>
--- 

Added: trunk/libcommons-discovery-java/debian/patches/java6_incompatible_types.diff
===================================================================
--- trunk/libcommons-discovery-java/debian/patches/java6_incompatible_types.diff	                        (rev 0)
+++ trunk/libcommons-discovery-java/debian/patches/java6_incompatible_types.diff	2011-11-01 14:41:14 UTC (rev 15315)
@@ -0,0 +1,79 @@
+Description: OpenJDK fails to compile commons-discovery 0.5
+ This works around the compiler problem by adding the type
+ parameters to the calls instead of letting the compiler infer them.
+Author: Denis Lila <dlila at redhat dot com>
+Origin: https://issues.apache.org/jira/secure/attachment/12481130/ojdk-javac-workaround.patch
+Bug: https://issues.apache.org/jira/browse/DISCOVERY-18
+Bug-RedHat: https://bugzilla.redhat.com/show_bug.cgi?id=706066
+Applied-Upstream: 0.6
+Index: b/src/java/org/apache/commons/discovery/tools/DiscoverClass.java
+===================================================================
+--- a/src/java/org/apache/commons/discovery/tools/DiscoverClass.java
++++ b/src/java/org/apache/commons/discovery/tools/DiscoverClass.java
+@@ -185,7 +185,7 @@
+      *            the resulting class does not implement (or extend) the SPI.
+      */
+     public <T, S extends T> Class<S> find(Class<T> spiClass) throws DiscoveryException {
+-        return find(getClassLoaders(spiClass),
++        return DiscoverClass.<T, S>find(getClassLoaders(spiClass),
+                     new SPInterface<T>(spiClass),
+                     nullProperties,
+                     (DefaultClassHolder<T>) null);
+@@ -204,7 +204,7 @@
+      *            the resulting class does not implement (or extend) the SPI.
+      */
+     public <T, S extends T> Class<S> find(Class<T> spiClass, Properties properties) throws DiscoveryException {
+-        return find(getClassLoaders(spiClass),
++        return DiscoverClass.<T, S>find(getClassLoaders(spiClass),
+                     new SPInterface<T>(spiClass),
+                     new PropertiesHolder(properties),
+                     (DefaultClassHolder<T>) null);
+@@ -223,7 +223,7 @@
+      *            the resulting class does not implement (or extend) the SPI.
+      */
+     public <T, S extends T> Class<S> find(Class<T> spiClass, String defaultImpl) throws DiscoveryException {
+-        return find(getClassLoaders(spiClass),
++        return DiscoverClass.<T, S>find(getClassLoaders(spiClass),
+                     new SPInterface<T>(spiClass),
+                     nullProperties,
+                     new DefaultClassHolder<T>(defaultImpl));
+@@ -244,7 +244,7 @@
+      */
+     public <T, S extends T> Class<S> find(Class<T> spiClass, Properties properties, String defaultImpl)
+             throws DiscoveryException {
+-        return find(getClassLoaders(spiClass),
++        return DiscoverClass.<T, S>find(getClassLoaders(spiClass),
+                     new SPInterface<T>(spiClass),
+                     new PropertiesHolder(properties),
+                     new DefaultClassHolder<T>(defaultImpl));
+@@ -265,7 +265,7 @@
+      */
+     public <T, S extends T> Class<S> find(Class<T> spiClass, String propertiesFileName, String defaultImpl)
+             throws DiscoveryException {
+-        return find(getClassLoaders(spiClass),
++        return DiscoverClass.<T, S>find(getClassLoaders(spiClass),
+                     new SPInterface<T>(spiClass),
+                     new PropertiesHolder(propertiesFileName),
+                     new DefaultClassHolder<T>(defaultImpl));
+@@ -517,7 +517,7 @@
+                IllegalAccessException,
+                NoSuchMethodException,
+                InvocationTargetException {
+-        return spi.newInstance(find(loaders, spi, properties, defaultImpl));
++        return spi.newInstance(DiscoverClass.<T, T>find(loaders, spi, properties, defaultImpl));
+     }
+ 
+     /**
+Index: b/src/java/org/apache/commons/discovery/tools/Service.java
+===================================================================
+--- a/src/java/org/apache/commons/discovery/tools/Service.java
++++ b/src/java/org/apache/commons/discovery/tools/Service.java
+@@ -63,7 +63,7 @@
+      * @return Enumeration of class instances ({@code S})
+      */
+     public static <T, S extends T> Enumeration<S> providers(Class<T> spiClass) {
+-        return providers(new SPInterface<T>(spiClass), null);
++        return Service.<T, S>providers(new SPInterface<T>(spiClass), null);
+     }
+ 
+     /**

Added: trunk/libcommons-discovery-java/debian/patches/java6_incompatible_types_tests.diff
===================================================================
--- trunk/libcommons-discovery-java/debian/patches/java6_incompatible_types_tests.diff	                        (rev 0)
+++ trunk/libcommons-discovery-java/debian/patches/java6_incompatible_types_tests.diff	2011-11-01 14:41:14 UTC (rev 15315)
@@ -0,0 +1,39 @@
+Index: b/src/test/org/apache/commons/discovery/test/TestAll.java
+===================================================================
+--- a/src/test/org/apache/commons/discovery/test/TestAll.java
++++ b/src/test/org/apache/commons/discovery/test/TestAll.java
+@@ -41,6 +41,7 @@
+ import org.apache.commons.discovery.tools.ManagedProperties;
+ import org.apache.commons.discovery.tools.PropertiesHolder;
+ import org.apache.commons.discovery.tools.SPInterface;
++import org.apache.commons.discovery.tools.Service;
+ import org.apache.commons.logging.Log;
+ import org.junit.Test;
+ 
+@@ -263,7 +264,7 @@
+         ClassLoaders loaders = ClassLoaders.getAppLoaders(TestInterface2.class, getClass(), false);
+ 
+         DiscoverClass discover = new DiscoverClass(loaders);
+-        Class<? extends TestInterface2> implClass = discover.find(TestInterface2.class);
++        Class<? extends TestInterface2> implClass = discover.<TestInterface2,TestInterface2>find(TestInterface2.class);
+ 
+         assertTrue("Failed to find an implementation class", implClass != null);
+         assertEquals("org.apache.commons.discovery.test.TestImpl2_1", implClass.getName());
+@@ -274,7 +275,7 @@
+         ClassLoaders loaders = ClassLoaders.getAppLoaders(TestInterface3.class, getClass(), false);
+ 
+         DiscoverClass discover = new DiscoverClass(loaders);
+-        Class<? extends TestInterface3> implClass = discover.find(TestInterface3.class);
++        Class<? extends TestInterface3> implClass = discover.<TestInterface3,TestInterface3>find(TestInterface3.class);
+ 
+         assertTrue("Failed to find an implementation class", implClass != null);
+         assertEquals("org.apache.commons.discovery.test.TestImpl3$InnerTestImpl", implClass.getName());
+@@ -297,7 +298,7 @@
+         final int expectedLogImplementations = 2;
+         int actualLogImplementations = 0;
+ 
+-        Enumeration<? extends Log> logImplementations = providers(newSPInterface(Log.class,
++        Enumeration<? extends Log> logImplementations = Service.<Log,Log>providers(newSPInterface(Log.class,
+                 new Class<?>[]{ String.class },
+                 new Object[]{ getClass().getName() }),
+                 null);

Deleted: trunk/libcommons-discovery-java/debian/patches/series
===================================================================
--- trunk/libcommons-discovery-java/debian/patches/series	2011-11-01 04:14:51 UTC (rev 15314)
+++ trunk/libcommons-discovery-java/debian/patches/series	2011-11-01 14:41:14 UTC (rev 15315)
@@ -1 +0,0 @@
-0001-set-source-and-target-version-1.5.patch

Added: trunk/libcommons-discovery-java/debian/patches/series
===================================================================
--- trunk/libcommons-discovery-java/debian/patches/series	                        (rev 0)
+++ trunk/libcommons-discovery-java/debian/patches/series	2011-11-01 14:41:14 UTC (rev 15315)
@@ -0,0 +1,2 @@
+java6_incompatible_types.diff
+java6_incompatible_types_tests.diff




More information about the pkg-java-commits mailing list