simplify code (inline method)
authorKonrad Windszus <kwin@apache.org>
Fri, 22 Jan 2016 13:31:57 +0000 (13:31 +0000)
committerKonrad Windszus <kwin@apache.org>
Fri, 22 Jan 2016 13:31:57 +0000 (13:31 +0000)
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/models/impl@1726206 13f79535-47bb-0310-9956-ffa450edef68

src/main/java/org/apache/sling/models/impl/injectors/BindingsInjector.java

index ca70946..e9c76d3 100644 (file)
@@ -49,10 +49,6 @@ public class BindingsInjector implements Injector, StaticInjectAnnotationProcess
         return "script-bindings";
     }
 
-    private static Object getValue(SlingBindings bindings, String name, Class<?> type) {
-        return bindings.get(name);
-    }
-
     public Object getValue(@Nonnull Object adaptable, String name, @Nonnull Type type, @Nonnull AnnotatedElement element,
             @Nonnull DisposalCallbackRegistry callbackRegistry) {
         SlingBindings bindings = getBindings(adaptable);
@@ -60,7 +56,7 @@ public class BindingsInjector implements Injector, StaticInjectAnnotationProcess
             return null;
         }
         if (type instanceof Class<?>) {
-            return getValue(bindings, name, (Class<?>) type);
+            return bindings.get(name);
         } else {
             log.debug("BindingsInjector doesn't support non-class type {}", type);
             return null;