Specialize JSONCodec to JSONValueWriter
[yangtools.git] / common / util / src / main / java / org / opendaylight / yangtools / util / ClassLoaderUtils.java
index 8681af68ed706af0c44359f77fecd0a2f4462436..db136459a6aa6288156a50d63465b77076750f2c 100644 (file)
@@ -140,10 +140,8 @@ public final class ClassLoaderUtils {
         requireNonNull(genericType);
 
         for (var type : subclass.getGenericInterfaces()) {
-            if (type instanceof ParameterizedType ptype) {
-                if (genericType.equals(ptype.getRawType())) {
-                    return Optional.of(ptype);
-                }
+            if (type instanceof ParameterizedType ptype && genericType.equals(ptype.getRawType())) {
+                return Optional.of(ptype);
             }
         }