diff --git a/src/main/java/io/airlift/command/model/MetadataLoader.java b/src/main/java/io/airlift/command/model/MetadataLoader.java index 0279108c9..bf3faeaa6 100644 --- a/src/main/java/io/airlift/command/model/MetadataLoader.java +++ b/src/main/java/io/airlift/command/model/MetadataLoader.java @@ -74,6 +74,10 @@ public CommandMetadata apply(Class commandType) public static CommandMetadata loadCommand(Class commandType) { + if (commandType == null) { + return null; + } + Command command = null; for (Class cls = commandType; command == null && !Object.class.equals(cls); cls = cls.getSuperclass()) { command = cls.getAnnotation(Command.class);