Fix FELIX-2781 Expose the implementation class as service when no interfaces are found in the hierachy

Update the changelog
Add tests to check FELIX-2781

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1059383 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/core/doc/changelog.txt b/ipojo/core/doc/changelog.txt
index 7a02735..bb0f693 100644
--- a/ipojo/core/doc/changelog.txt
+++ b/ipojo/core/doc/changelog.txt
@@ -5,6 +5,7 @@
     * [FELIX-2716] - [iPOJO] Failure when creating proxies for classes in java.* packages
 
 ** Improvement
+    * [FELIX-2781] - Expose the implementation class as service when no interfaces are found in the hierarchy
     * [FELIX-1424] - Constructor Injection
     * [FELIX-1428] - Constructor injection of Configuration properties
     * [FELIX-2461] - Allow specifying the targeted service interface in the @ServiceController
diff --git a/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/providedservice/ProvidedServiceHandler.java b/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/providedservice/ProvidedServiceHandler.java
index e91beab..9a40430 100644
--- a/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/providedservice/ProvidedServiceHandler.java
+++ b/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/providedservice/ProvidedServiceHandler.java
@@ -596,7 +596,8 @@
             }
 
             if (all.isEmpty()) {
-                throw new ConfigurationException("Service Providing: Cannot instantiate a provided service : no specifications found (no interfaces implemented by the pojo)");
+            	warn("No service interface found in the class hierarchy, use the implementation class");
+                all.add(desc.getFactory().getClassName());
             }
 
             StringBuffer specs = null;