Add null check to isSkippable. Fixes #9278 (#9280)

Motivation:

Currently GraalVM substrate returns null for reflective calls if the reflection access is not declared up front.

A change introduced in Netty 4.1.35 results in needing to register every Netty handler for reflection. This complicates matters as it is difficult to know all the possible handlers that need to be registered.

Modification:

This change adds a simple
null check such that Netty does not break on GraalVM substrate without the reflection information registration.

Result:

Fixes #9278
This commit is contained in:
Graeme Rocher 2019-06-25 14:45:30 +02:00 committed by Norman Maurer
parent e6adf1a590
commit f48d9ad15f

View File

@ -179,7 +179,7 @@ final class ChannelHandlerMask {
"Class {} missing method {}, assume we can not skip execution", handlerType, methodName, e);
return false;
}
return m.isAnnotationPresent(Skip.class);
return m != null && m.isAnnotationPresent(Skip.class);
});
}