Simplify code using Java 8 features
[netconf.git] / netconf / netconf-netty-util / src / main / java / org / opendaylight / netconf / nettyutil / handler / NetconfEXICodec.java
index 383e8b7d50d2eb87e3ffeb5cbfe9e8b5d9703991..44d07209e7271efd8db7ff06a067839fd52307e6 100644 (file)
@@ -26,12 +26,7 @@ public final class NetconfEXICodec {
      * OpenEXI does not allow us to directly prevent resolution of external entities. In order
      * to prevent XXE attacks, we reuse a single no-op entity resolver.
      */
-    private static final EntityResolver ENTITY_RESOLVER = new EntityResolver() {
-        @Override
-        public InputSource resolveEntity(final String publicId, final String systemId) {
-            return new InputSource();
-        }
-    };
+    private static final EntityResolver ENTITY_RESOLVER = (publicId, systemId) -> new InputSource();
 
     /**
      * Since we have a limited number of options we can have, instantiating a weak cache