[pkg-java] r15421 - in trunk/libxbean-java/debian: . patches
Damien Raude-Morvan
drazzib at alioth.debian.org
Sun Nov 20 17:43:41 UTC 2011
Author: drazzib
Date: 2011-11-20 17:43:39 +0000 (Sun, 20 Nov 2011)
New Revision: 15421
Added:
trunk/libxbean-java/debian/patches/fix_osgi43.diff
Modified:
trunk/libxbean-java/debian/changelog
trunk/libxbean-java/debian/patches/full.series
Log:
Fix "FTBFS: Error Building Apache XBean OSGI Bundle Utilities":
New d/patches/fix_osgi_43.diff. (Closes: #648660)
Modified: trunk/libxbean-java/debian/changelog
===================================================================
--- trunk/libxbean-java/debian/changelog 2011-11-20 17:32:19 UTC (rev 15420)
+++ trunk/libxbean-java/debian/changelog 2011-11-20 17:43:39 UTC (rev 15421)
@@ -2,8 +2,10 @@
* Depends and Build-Depends on libosgi-core-java and libosgi-compendium-java
instead of libequinox-osgi-java.
+ * Fix "FTBFS: Error Building Apache XBean OSGI Bundle Utilities":
+ New d/patches/fix_osgi_43.diff. (Closes: #648660)
- -- Damien Raude-Morvan <drazzib at debian.org> Mon, 24 Oct 2011 20:11:18 +0200
+ -- Damien Raude-Morvan <drazzib at debian.org> Sun, 20 Nov 2011 18:02:41 +0100
libxbean-java (3.7-2) unstable; urgency=low
Added: trunk/libxbean-java/debian/patches/fix_osgi43.diff
===================================================================
--- trunk/libxbean-java/debian/patches/fix_osgi43.diff (rev 0)
+++ trunk/libxbean-java/debian/patches/fix_osgi43.diff 2011-11-20 17:43:39 UTC (rev 15421)
@@ -0,0 +1,78 @@
+Description: Add some delegator for OSGi R4.3 support (related to generics)
+Author: Damien Raude-Morvan <drazzib at debian.org>
+Last-Update: 2011-11-20
+Forwarded: no
+Index: b/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundle.java
+===================================================================
+--- a/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundle.java
++++ b/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundle.java
+@@ -21,6 +21,7 @@
+
+ import java.io.IOException;
+ import java.io.InputStream;
++import java.io.File;
+ import java.net.URL;
+ import java.util.ArrayList;
+ import java.util.Collection;
+@@ -195,5 +196,19 @@
+ public String toString() {
+ return "[DelegatingBundle: " + bundles + "]";
+ }
+-
++
++ // OSGI 4.3
++ public File getDataFile(String filename) {
++ return bundle.getDataFile(filename);
++ }
++
++ // OSGI 4.3
++ public <A> A adapt(Class<A> type) {
++ return bundle.<A>adapt(type);
++ }
++
++ // OSGI 4.3
++ public int compareTo(Bundle bundle) {
++ return bundle.compareTo(bundle);
++ }
+ }
+Index: b/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java
+===================================================================
+--- a/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java
++++ b/xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java
+@@ -22,6 +22,7 @@
+ import java.io.File;
+ import java.io.InputStream;
+ import java.util.Dictionary;
++import java.util.Collection;
+
+ import org.osgi.framework.Bundle;
+ import org.osgi.framework.BundleContext;
+@@ -139,4 +140,28 @@
+ return bundleContext.ungetService(arg0);
+ }
+
++ // OSGI 4.3
++ public <S> ServiceRegistration<S> registerService(Class<S> clazz,
++ S service,
++ Dictionary<String,?> properties) {
++ return bundleContext.registerService(clazz, service, properties);
++ }
++
++ // OSGI 4.3
++ public <S> ServiceReference<S> getServiceReference(Class<S> clazz) {
++ return bundleContext.getServiceReference(clazz);
++ }
++
++ // OSGI 4.3
++ public <S> Collection<ServiceReference<S>> getServiceReferences(Class<S> clazz,
++ String filter)
++ throws InvalidSyntaxException {
++ return bundleContext.getServiceReferences(clazz, filter);
++ }
++
++ // OSGI 4.3
++ public Bundle getBundle(String location) {
++ return bundleContext.getBundle(location);
++ }
++
+ }
Modified: trunk/libxbean-java/debian/patches/full.series
===================================================================
--- trunk/libxbean-java/debian/patches/full.series 2011-11-20 17:32:19 UTC (rev 15420)
+++ trunk/libxbean-java/debian/patches/full.series 2011-11-20 17:43:39 UTC (rev 15421)
@@ -1,2 +1,3 @@
bundle.diff
modules.diff
+fix_osgi43.diff
More information about the pkg-java-commits
mailing list