Minor sonar fixes
This commit is contained in:
@@ -93,19 +93,6 @@ public class TmdbKeywords extends AbstractMethod {
|
||||
TmdbResultsList<MovieBasic> results = new TmdbResultsList<MovieBasic>(wrapper.getResults());
|
||||
results.copyWrapper(wrapper);
|
||||
return results;
|
||||
|
||||
|
||||
|
||||
// String webpage = httpTools.getRequest(url);
|
||||
//
|
||||
// try {
|
||||
// WrapperKeywordMovies wrapper = MAPPER.readValue(webpage, WrapperKeywordMovies.class);
|
||||
// TmdbResultsList<KeywordMovie> results = new TmdbResultsList<KeywordMovie>(wrapper.getResults());
|
||||
// results.copyWrapper(wrapper);
|
||||
// return results;
|
||||
// } catch (IOException ex) {
|
||||
// throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get keyword movies", url, ex);
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -106,7 +106,8 @@ public class TmdbPeople extends AbstractMethod {
|
||||
String webpage = httpTools.getRequest(url);
|
||||
|
||||
try {
|
||||
TypeReference tr = new TypeReference<PersonCredits<CreditMovieBasic>>(){};
|
||||
TypeReference tr = new TypeReference<PersonCredits<CreditMovieBasic>>() {
|
||||
};
|
||||
return MAPPER.readValue(webpage, tr);
|
||||
} catch (IOException ex) {
|
||||
throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get person movie credits", url, ex);
|
||||
@@ -138,7 +139,8 @@ public class TmdbPeople extends AbstractMethod {
|
||||
String webpage = httpTools.getRequest(url);
|
||||
|
||||
try {
|
||||
TypeReference tr = new TypeReference<PersonCredits<CreditTVBasic>>(){};
|
||||
TypeReference tr = new TypeReference<PersonCredits<CreditTVBasic>>() {
|
||||
};
|
||||
return MAPPER.readValue(webpage, tr);
|
||||
} catch (IOException ex) {
|
||||
throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get person TV credits", url, ex);
|
||||
@@ -172,8 +174,8 @@ public class TmdbPeople extends AbstractMethod {
|
||||
try {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
mapper.addMixIn(PersonCredits.class, PersonCreditsMixIn.class);
|
||||
TypeReference tr = new TypeReference<PersonCredits<CreditBasic>>(){};
|
||||
// return mapper.readValue(webpage, PersonCredits.class);
|
||||
TypeReference tr = new TypeReference<PersonCredits<CreditBasic>>() {
|
||||
};
|
||||
return mapper.readValue(webpage, tr);
|
||||
} catch (IOException ex) {
|
||||
throw new MovieDbException(ApiExceptionType.MAPPING_FAILED, "Failed to get person combined credits", url, ex);
|
||||
|
||||
@@ -42,7 +42,9 @@ public class PersonCreditsMixIn {
|
||||
@JsonSubTypes.Type(value = CreditTVBasic.class, name = "tv")
|
||||
})
|
||||
@JsonSetter("cast")
|
||||
public void setCast(List<CreditBasic> cast){}
|
||||
public void setCast(List<CreditBasic> cast) {
|
||||
// Mixin empty class
|
||||
}
|
||||
|
||||
@JsonTypeInfo(
|
||||
use = JsonTypeInfo.Id.NAME,
|
||||
@@ -55,6 +57,8 @@ public class PersonCreditsMixIn {
|
||||
@JsonSubTypes.Type(value = CreditTVBasic.class, name = "tv")
|
||||
})
|
||||
@JsonSetter("crew")
|
||||
public void setCrew(List<CreditBasic> crew){}
|
||||
public void setCrew(List<CreditBasic> crew) {
|
||||
// Mixin empty class
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user