Added missing final modifiers and @NotNull annotations.