Move createProxy()
[controller.git] / opendaylight / md-sal / sal-binding-broker / src / main / java / org / opendaylight / controller / md / sal / binding / impl / DirectGetterRouteContextExtractor.java
index 33e0582f2a24dbc638237fd96da30c8ed9cb6f25..f9c45b9fecf32ac89612176c64a7d482762b978e 100644 (file)
@@ -1,10 +1,11 @@
 /*
  * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
  *
- * This program and the accompanying materials are made available under the terms of the Eclipse
- * Public License v1.0 which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
+
 package org.opendaylight.controller.md.sal.binding.impl;
 
 import com.google.common.base.Throwables;
@@ -16,27 +17,28 @@ import java.lang.reflect.Method;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
+@Deprecated
 final class DirectGetterRouteContextExtractor extends ContextReferenceExtractor {
 
-    private final static Lookup PUBLIC_LOOKUP = MethodHandles.publicLookup();
+    private static final Lookup PUBLIC_LOOKUP = MethodHandles.publicLookup();
     private final MethodHandle handle;
 
     private DirectGetterRouteContextExtractor(final MethodHandle rawHandle) {
         handle = rawHandle.asType(MethodType.methodType(InstanceIdentifier.class, DataObject.class));
     }
 
-    static final ContextReferenceExtractor create(final Method getterMethod) throws IllegalAccessException {
+    static ContextReferenceExtractor create(final Method getterMethod) throws IllegalAccessException {
         final MethodHandle getterHandle = PUBLIC_LOOKUP.unreflect(getterMethod);
         return new DirectGetterRouteContextExtractor(getterHandle);
     }
 
     @Override
+    @SuppressWarnings("checkstyle:IllegalCatch")
     InstanceIdentifier<?> extract(final DataObject obj) {
         try {
             return (InstanceIdentifier<?>) handle.invokeExact(obj);
-        } catch (final Throwable e) {
+        } catch (Throwable e) {
             throw Throwables.propagate(e);
         }
     }
-
 }