diff --git a/src/main/java/com/omertron/themoviedbapi/methods/TmdbPeople.java b/src/main/java/com/omertron/themoviedbapi/methods/TmdbPeople.java index 478601b23..2689c36cb 100644 --- a/src/main/java/com/omertron/themoviedbapi/methods/TmdbPeople.java +++ b/src/main/java/com/omertron/themoviedbapi/methods/TmdbPeople.java @@ -46,6 +46,7 @@ import com.omertron.themoviedbapi.tools.Param; import com.omertron.themoviedbapi.tools.TmdbParameters; import java.io.IOException; import java.net.URL; +import org.apache.commons.lang3.StringUtils; import org.yamj.api.common.exception.ApiExceptionType; /** @@ -80,7 +81,7 @@ public class TmdbPeople extends AbstractMethod { // Switch combined credits for tv & movie. String atr = (String) parameters.get(Param.APPEND); - if (atr.contains("combined_credits")) { + if (StringUtils.isNotBlank(atr) && atr.contains("combined_credits")) { atr = atr.replace("combined_credits", "tv_credits,movie_credits"); parameters.add(Param.APPEND, atr); } @@ -123,9 +124,11 @@ public class TmdbPeople extends AbstractMethod { /** * Get the TV credits for a specific person id. * - * To get the expanded details for each record, call the /credit method with the provided credit_id. + * To get the expanded details for each record, call the /credit method with + * the provided credit_id. * - * This will provide details about which episode and/or season the credit is for. + * This will provide details about which episode and/or season the credit is + * for. * * @param personId * @param language @@ -152,9 +155,11 @@ public class TmdbPeople extends AbstractMethod { /** * Get the combined (movie and TV) credits for a specific person id. * - * To get the expanded details for each TV record, call the /credit method with the provided credit_id. + * To get the expanded details for each TV record, call the /credit method + * with the provided credit_id. * - * This will provide details about which episode and/or season the credit is for. + * This will provide details about which episode and/or season the credit is + * for. * * @param personId * @param language @@ -228,7 +233,8 @@ public class TmdbPeople extends AbstractMethod { /** * Get the images that have been tagged with a specific person id. * - * We return all of the image results with a media object mapped for each image. + * We return all of the image results with a media object mapped for each + * image. * * @param personId * @param page @@ -254,7 +260,8 @@ public class TmdbPeople extends AbstractMethod { * * By default, only the last 24 hours of changes are returned. * - * The maximum number of days that can be returned in a single request is 14. + * The maximum number of days that can be returned in a single request is + * 14. * * The language is present on fields that are translatable. *