update generatePagination(int pageNumber-->Integer pageNumber

when pageNumber is null,nullpointexception