You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 10:24:44 UTC

[sling-org-apache-sling-testing-sling-mock] 12/17: SLING-6363 add methods for OSGi R5/R6 support

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.testing.sling-mock-1.9.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit 37ef0fe8fce462a7641339766b4e70426f208ba8
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Sun Dec 4 10:40:07 2016 +0000

    SLING-6363 add methods for OSGi R5/R6 support
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/branches/testing/mocks/sling-mock-1.x@1772519 13f79535-47bb-0310-9956-ffa450edef68
---
 .../mock/sling/context/ModelAdapterFactoryUtil.java    | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/testing/mock/sling/context/ModelAdapterFactoryUtil.java b/src/main/java/org/apache/sling/testing/mock/sling/context/ModelAdapterFactoryUtil.java
index 8ef50d0..5bfcaa8 100644
--- a/src/main/java/org/apache/sling/testing/mock/sling/context/ModelAdapterFactoryUtil.java
+++ b/src/main/java/org/apache/sling/testing/mock/sling/context/ModelAdapterFactoryUtil.java
@@ -18,6 +18,7 @@
  */
 package org.apache.sling.testing.mock.sling.context;
 
+import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.MalformedURLException;
@@ -218,7 +219,7 @@ final class ModelAdapterFactoryUtil {
 
         @Override
         public Dictionary getHeaders() {
-            Dictionary<String, Object> headers = new Hashtable<String, Object>();
+            Dictionary<String, String> headers = new Hashtable<String, String>();
             headers.put(PACKAGE_HEADER, MAGIC_STRING);
             return headers;
         }
@@ -350,6 +351,21 @@ final class ModelAdapterFactoryUtil {
             return null;
         }
 
+        // this is part of osgi 5/6
+        public int compareTo(Bundle o) {
+            return 0;
+        }
+
+        // this is part of osgi 5/6
+        public <A> A adapt(Class<A> type) {
+            return null;
+        }
+
+        // this is part of osgi 5/6
+        public File getDataFile(String filename) {
+            return null;
+        }
+
     }
 
 }

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.