Removed deprecated api calls
diff --git a/src/main/java/org/apache/sling/servlets/get/impl/helpers/PlainTextRendererServlet.java b/src/main/java/org/apache/sling/servlets/get/impl/helpers/PlainTextRendererServlet.java
index d6a7e28..bf66e09 100644
--- a/src/main/java/org/apache/sling/servlets/get/impl/helpers/PlainTextRendererServlet.java
+++ b/src/main/java/org/apache/sling/servlets/get/impl/helpers/PlainTextRendererServlet.java
@@ -58,7 +58,7 @@
 
         final PrintWriter pw = resp.getWriter();
         @SuppressWarnings("unchecked")
-        final Map map = r.adaptTo(Map.class);
+        final Map<String,Object> map = r.adaptTo(Map.class);
         if ( map != null ) {
             dump(pw, r, map);
         } else if ( r.adaptTo(String.class) != null ) {
@@ -84,8 +84,7 @@
      * @param r the resource
      * @param map the resource's properties
      */
-    @SuppressWarnings("unchecked")
-    protected void dump(PrintWriter pw, Resource r, Map map) {
+    protected void dump(PrintWriter pw, Resource r, Map<String, Object> map) {
         pw.println("** Resource dumped by " + getClass().getSimpleName() + "**");
         pw.println("Resource path:" + r.getPath());
         pw.println("Resource metadata: " + r.getResourceMetadata());
@@ -98,10 +97,10 @@
         pw.println("Resource super type: " + resourceSuperType);
 
         pw.println("\n** Resource properties **");
-        final Iterator<Map.Entry> pi = map.entrySet().iterator();
+        final Iterator<Map.Entry<String,Object>> pi = map.entrySet().iterator();
         while ( pi.hasNext() ) {
-            final Map.Entry p = pi.next();
-            printPropertyValue(pw, p.getKey().toString(), p.getValue(), true);
+            final Map.Entry<String,Object> p = pi.next();
+            printPropertyValue(pw, p.getKey(), p.getValue(), true);
             pw.println();
         }
     }
diff --git a/src/main/java/org/apache/sling/servlets/get/impl/helpers/StreamRendererServlet.java b/src/main/java/org/apache/sling/servlets/get/impl/helpers/StreamRendererServlet.java
index 08e04e2..f89fa46 100644
--- a/src/main/java/org/apache/sling/servlets/get/impl/helpers/StreamRendererServlet.java
+++ b/src/main/java/org/apache/sling/servlets/get/impl/helpers/StreamRendererServlet.java
@@ -454,7 +454,7 @@
         }
 
         // render the children
-        Iterator<Resource> children = ResourceUtil.listChildren(resource);
+        Iterator<Resource> children = resource.listChildren();
         while (children.hasNext()) {
             renderChild(pw, children.next());
         }
diff --git a/src/main/java/org/apache/sling/servlets/get/impl/util/JsonObjectCreator.java b/src/main/java/org/apache/sling/servlets/get/impl/util/JsonObjectCreator.java
index 1c9971b..6f6b48a 100644
--- a/src/main/java/org/apache/sling/servlets/get/impl/util/JsonObjectCreator.java
+++ b/src/main/java/org/apache/sling/servlets/get/impl/util/JsonObjectCreator.java
@@ -38,37 +38,18 @@
 
 public abstract class JsonObjectCreator {
 
-    /**
-     * Dump given resource in JSON, optionally recursing into its objects
-     */
-    public static JsonObjectBuilder create(final Resource resource, final int maxRecursionLevels) {
-        return create(resource, 0, maxRecursionLevels);
-    }
-
-
-    /** Dump given resource in JSON, optionally recursing into its objects */
-    private static JsonObjectBuilder create(final Resource resource,
-            final int currentRecursionLevel,
-            final int maxRecursionLevels) {
-        final ValueMap valueMap = resource.adaptTo(ValueMap.class);
-
-        final Map propertyMap = (valueMap != null)
-                ? valueMap
-                : resource.adaptTo(Map.class);
+    public static JsonObjectBuilder create(final Resource resource) {
+        final ValueMap valueMap = resource.getValueMap();
 
         final JsonObjectBuilder obj = Json.createObjectBuilder();
 
-        if (propertyMap == null) {
+        if (valueMap.isEmpty()) {
 
             // no map available, try string
             final String value = resource.adaptTo(String.class);
             if (value != null) {
-
-                // single value property or just plain String resource or...
                 obj.add(resource.getName(), value.toString());
-
             } else {
-
                 // Try multi-value "property"
                 final String[] values = resource.adaptTo(String[].class);
                 if (values != null) {
@@ -84,12 +65,11 @@
 
         } else {
 
-            @SuppressWarnings("unchecked")
-            final Iterator<Map.Entry> props = propertyMap.entrySet().iterator();
+            final Iterator<Map.Entry<String,Object>> props = valueMap.entrySet().iterator();
 
             // the node's actual properties
             while (props.hasNext()) {
-                final Map.Entry prop = props.next();
+                final Map.Entry<String,Object> prop = props.next();
 
                 if ( prop.getValue() != null ) {
                     createProperty(obj, valueMap, prop.getKey().toString(),
@@ -98,16 +78,6 @@
             }
         }
 
-        // the child nodes
-        if (recursionLevelActive(currentRecursionLevel, maxRecursionLevels)) {
-            final Iterator<Resource> children = resource.listChildren();
-            while (children.hasNext()) {
-                final Resource n = children.next();
-                createSingleResource(n, obj, currentRecursionLevel,
-                    maxRecursionLevels);
-            }
-        }
-
         return obj;
     }
 
@@ -148,21 +118,6 @@
         return builder.build().get("entry");
     }
 
-    /** Dump a single node */
-    private static void createSingleResource(final Resource n, final JsonObjectBuilder parent,
-            final int currentRecursionLevel, final int maxRecursionLevels) {
-        if (recursionLevelActive(currentRecursionLevel, maxRecursionLevels)) {
-            parent.add(n.getName(), create(n, currentRecursionLevel + 1, maxRecursionLevels));
-        }
-    }
-
-    /** true if the current recursion level is active */
-    private static boolean recursionLevelActive(final int currentRecursionLevel,
-            final int maxRecursionLevels) {
-        return maxRecursionLevels < 0
-            || currentRecursionLevel < maxRecursionLevels;
-    }
-
     /**
      * Write a single property
      */
diff --git a/src/main/java/org/apache/sling/servlets/get/impl/util/ResourceTraversor.java b/src/main/java/org/apache/sling/servlets/get/impl/util/ResourceTraversor.java
index 16998fa..6e913d6 100644
--- a/src/main/java/org/apache/sling/servlets/get/impl/util/ResourceTraversor.java
+++ b/src/main/java/org/apache/sling/servlets/get/impl/util/ResourceTraversor.java
@@ -148,7 +148,7 @@
      * @throws JSONException
      */
     private JsonObjectBuilder adapt(final Resource resource) {
-        return JsonObjectCreator.create(resource, 0);
+        return JsonObjectCreator.create(resource);
     }
 
     /**
diff --git a/src/main/java/org/apache/sling/servlets/get/impl/version/VersionInfoServlet.java b/src/main/java/org/apache/sling/servlets/get/impl/version/VersionInfoServlet.java
index c0a883c..a9d806e 100644
--- a/src/main/java/org/apache/sling/servlets/get/impl/version/VersionInfoServlet.java
+++ b/src/main/java/org/apache/sling/servlets/get/impl/version/VersionInfoServlet.java
@@ -26,9 +26,11 @@
 
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;
+import javax.jcr.Session;
 import javax.jcr.version.Version;
 import javax.jcr.version.VersionHistory;
 import javax.jcr.version.VersionIterator;
+import javax.jcr.version.VersionManager;
 import javax.json.Json;
 import javax.json.JsonArrayBuilder;
 import javax.json.JsonObject;
@@ -104,21 +106,23 @@
                     .withArraysForChildren(harray);
         
         try {
-            resp.getWriter().write(renderer.prettyPrint(getJsonObject(req.getResource()), opt));
+        	VersionManager vm = req.getResourceResolver().adaptTo(Session.class).getWorkspace().getVersionManager();
+            resp.getWriter().write(renderer.prettyPrint(getJsonObject(req.getResource(), vm), opt));
         } catch (Exception e) {
             throw new ServletException(e);
         }
     }
 
-    private JsonObject getJsonObject(Resource resource) throws RepositoryException {
+    private JsonObject getJsonObject(Resource resource, VersionManager vm) throws RepositoryException {
         final JsonObjectBuilder result = Json.createObjectBuilder();
         final Node node = resource.adaptTo(Node.class);
         if (node == null || !node.isNodeType(JcrConstants.MIX_VERSIONABLE)) {
             return result.build();
         }
-
-        final VersionHistory history = node.getVersionHistory();
-        final Version baseVersion = node.getBaseVersion();
+        final String absPath = resource.getPath();
+        final VersionHistory history = vm.getVersionHistory(absPath);
+        final Version baseVersion = vm.getBaseVersion(absPath);
+        
         for (final VersionIterator it = history.getAllVersions(); it.hasNext();) {
             final Version v = it.nextVersion();
             final JsonObjectBuilder obj = Json.createObjectBuilder();
diff --git a/src/test/java/org/apache/sling/servlets/get/impl/RedirectServletTest.java b/src/test/java/org/apache/sling/servlets/get/impl/RedirectServletTest.java
index 3a33de2..c5a4b7d 100644
--- a/src/test/java/org/apache/sling/servlets/get/impl/RedirectServletTest.java
+++ b/src/test/java/org/apache/sling/servlets/get/impl/RedirectServletTest.java
@@ -25,7 +25,6 @@
 
 import junit.framework.TestCase;
 
-import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.resource.ValueMap;
 import org.apache.sling.api.wrappers.ValueMapDecorator;
 import org.apache.sling.commons.testing.sling.MockResourceResolver;
diff --git a/src/test/java/org/apache/sling/servlets/get/impl/helpers/StreamRendererServletTest.java b/src/test/java/org/apache/sling/servlets/get/impl/helpers/StreamRendererServletTest.java
index b671f8b..b62c185 100644
--- a/src/test/java/org/apache/sling/servlets/get/impl/helpers/StreamRendererServletTest.java
+++ b/src/test/java/org/apache/sling/servlets/get/impl/helpers/StreamRendererServletTest.java
@@ -135,7 +135,8 @@
         final ResourceMetadata meta = Mockito.mock(ResourceMetadata.class);
         final ServletContext sc = Mockito.mock(ServletContext.class);
         
-        StreamRendererServlet streamRendererServlet = new StreamRendererServlet(true,new String []{"/"}) {
+        @SuppressWarnings("serial")
+		StreamRendererServlet streamRendererServlet = new StreamRendererServlet(true,new String []{"/"}) {
             @Override
             public ServletContext getServletContext() {
                 return sc;