E.g. "public Videos SearchVideos(String readToken, List<String> all, List<String> any, List<String> none, Boolean exact, SortByTypeEnum sortBy, SortOrderTypeEnum sortOrderType, Integer pageSize, Integer pageNumber, EnumSet<VideoFieldEnum> videoFields, Set<String> customFields) throws BrightcoveException" javadoc mentions that page_size is optional but throws NullPointerException when passed pageSize argument is null, since ">" operator on Integers will try to unbox null to an int. If page_size is truly optional, if argument is null it shouldn't probably be passed as parameter in actual call to media api (i.e. make "parameters.add(new BasicNameValuePair("page_size", ""+pageSize));" conditional, only if pageSize is not null)
Forgot to mention, affected version is 2.3