Cleaning up code

This commit is contained in:
jhouse
2019-10-09 16:33:32 +09:00
parent a7ac2cf264
commit da94c07b1a
3 changed files with 5 additions and 4 deletions
@@ -21,6 +21,7 @@ import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
@@ -68,7 +69,7 @@ public class GapsSearchBean implements GapsSearch {
private final UrlGenerator urlGenerator;
@Autowired
public GapsSearchBean(UrlGenerator urlGenerator) {
public GapsSearchBean(@Qualifier("real") UrlGenerator urlGenerator) {
this.ownedMovies = new HashSet<>();
this.searched = new HashSet<>();
this.recommended = new ArrayList<>();
@@ -781,7 +782,7 @@ public class GapsSearchBean implements GapsSearch {
}
}
public static class UserInputThreadCountdown implements java.lang.Runnable {
public static class UserInputThreadCountdown implements Runnable {
int time_limit = 60;
@@ -4,7 +4,7 @@ import okhttp3.HttpUrl;
import org.jetbrains.annotations.NotNull;
import org.springframework.stereotype.Service;
@Service
@Service(value="real")
public class GapsUrlGenerator implements UrlGenerator {
@Override
@@ -8,7 +8,7 @@ import okhttp3.mockwebserver.RecordedRequest;
import org.jetbrains.annotations.NotNull;
import org.springframework.stereotype.Service;
@Service
@Service(value="test")
public class GapsUrlGeneratorTest implements UrlGenerator {
private final static String GOOD_MOVIE_PLEX_XML = "<MediaContainer><Video title=\"Alien\" year=\"1979\"></Video></MediaContainer>";