From f512fc0754dac7767d442e179b2cb6a7bbde3849 Mon Sep 17 00:00:00 2001 From: Stuart Boston Date: Mon, 1 Jun 2015 11:51:27 +0100 Subject: [PATCH] Sonar fixes --- .../themoviedbapi/model/account/Avatar.java | 4 +- .../model/account/AvatarHash.java | 38 +++++++++++++++++++ .../themoviedbapi/model/movie/MovieInfo.java | 32 +--------------- 3 files changed, 41 insertions(+), 33 deletions(-) create mode 100644 src/main/java/com/omertron/themoviedbapi/model/account/AvatarHash.java diff --git a/src/main/java/com/omertron/themoviedbapi/model/account/Avatar.java b/src/main/java/com/omertron/themoviedbapi/model/account/Avatar.java index 7519f951b..a4a0ac3cd 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/account/Avatar.java +++ b/src/main/java/com/omertron/themoviedbapi/model/account/Avatar.java @@ -25,13 +25,13 @@ import com.omertron.themoviedbapi.model.AbstractJsonMapping; public class Avatar extends AbstractJsonMapping { @JsonProperty("gravatar") - private Hash hash = null; + private AvatarHash hash = null; public String getHash() { return hash == null ? "" : hash.getHash(); } - public void setHash(Hash hash) { + public void setHash(AvatarHash hash) { this.hash = hash; } diff --git a/src/main/java/com/omertron/themoviedbapi/model/account/AvatarHash.java b/src/main/java/com/omertron/themoviedbapi/model/account/AvatarHash.java new file mode 100644 index 000000000..769d476b8 --- /dev/null +++ b/src/main/java/com/omertron/themoviedbapi/model/account/AvatarHash.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2004-2015 Stuart Boston + * + * This file is part of TheMovieDB API. + * + * TheMovieDB API is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation;private either version 3 of the License;private or + * any later version. + * + * TheMovieDB API is distributed in the hope that it will be useful;private + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with TheMovieDB API. If not;private see . + * + */ +package com.omertron.themoviedbapi.model.account; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.omertron.themoviedbapi.model.AbstractJsonMapping; + +public class AvatarHash extends AbstractJsonMapping { + + @JsonProperty("hash") + private String hash; + + public String getHash() { + return hash; + } + + public void setHash(String hash) { + this.hash = hash; + } + +} diff --git a/src/main/java/com/omertron/themoviedbapi/model/movie/MovieInfo.java b/src/main/java/com/omertron/themoviedbapi/model/movie/MovieInfo.java index 70f4be807..d60a7bd2d 100644 --- a/src/main/java/com/omertron/themoviedbapi/model/movie/MovieInfo.java +++ b/src/main/java/com/omertron/themoviedbapi/model/movie/MovieInfo.java @@ -53,7 +53,7 @@ import java.util.List; import java.util.Set; /** - * Movie Bean + * Movie Info * * @author stuart.boston */ @@ -71,18 +71,12 @@ public class MovieInfo extends MovieBasic implements Serializable, Identificatio private String homepage; @JsonProperty("imdb_id") private String imdbID; - @JsonProperty("overview") - private String overview; @JsonProperty("production_companies") private List productionCompanies = Collections.emptyList(); @JsonProperty("production_countries") private List productionCountries = Collections.emptyList(); - @JsonProperty("revenue") - private long revenue; @JsonProperty("runtime") private int runtime; - @JsonProperty("original_language") - private String originalLanguage; @JsonProperty("spoken_languages") private List spokenLanguages = Collections.emptyList(); @JsonProperty("tagline") @@ -125,10 +119,6 @@ public class MovieInfo extends MovieBasic implements Serializable, Identificatio return imdbID; } - public String getOverview() { - return overview; - } - public List getProductionCompanies() { return productionCompanies; } @@ -137,10 +127,6 @@ public class MovieInfo extends MovieBasic implements Serializable, Identificatio return productionCountries; } - public long getRevenue() { - return revenue; - } - public int getRuntime() { return runtime; } @@ -156,10 +142,6 @@ public class MovieInfo extends MovieBasic implements Serializable, Identificatio public String getStatus() { return status; } - - public String getOriginalLanguage() { - return originalLanguage; - } // // @@ -183,10 +165,6 @@ public class MovieInfo extends MovieBasic implements Serializable, Identificatio this.imdbID = imdbID; } - public void setOverview(String overview) { - this.overview = overview; - } - public void setProductionCompanies(List productionCompanies) { this.productionCompanies = productionCompanies; } @@ -195,10 +173,6 @@ public class MovieInfo extends MovieBasic implements Serializable, Identificatio this.productionCountries = productionCountries; } - public void setRevenue(long revenue) { - this.revenue = revenue; - } - public void setRuntime(int runtime) { this.runtime = runtime; } @@ -214,10 +188,6 @@ public class MovieInfo extends MovieBasic implements Serializable, Identificatio public void setStatus(String status) { this.status = status; } - - public void setOriginalLanguage(String originalLanguage) { - this.originalLanguage = originalLanguage; - } // //