Skip to content

Commit

Permalink
Sonarlint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaytotomato committed Jul 23, 2024
1 parent 0600dcb commit cb72fe4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
11 changes: 7 additions & 4 deletions src/main/java/com/tomaytotomato/LocationService.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
import com.tomaytotomato.usecase.FindCity;
import com.tomaytotomato.usecase.FindCountry;
import com.tomaytotomato.usecase.FindState;

import java.io.IOException;
import java.util.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.logging.Logger;

public class LocationService implements FindCountry, FindState, FindCity {
Expand All @@ -38,7 +41,7 @@ public class LocationService implements FindCountry, FindState, FindCity {

private final TextNormaliser textNormaliser;

public LocationService(TextNormaliser textNormaliser) throws IOException {
public LocationService(TextNormaliser textNormaliser) {
this.textNormaliser = textNormaliser;
var dataLoader = new DefaultCountriesDataLoaderImpl();
countries = dataLoader.getCountries();
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/tomaytotomato/SearchLocationService.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.tomaytotomato.text.tokeniser.DefaultTextTokeniser;
import com.tomaytotomato.text.tokeniser.TextTokeniser;
import com.tomaytotomato.usecase.SearchLocation;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
Expand Down Expand Up @@ -45,7 +44,7 @@ public class SearchLocationService implements SearchLocation {
private final TextNormaliser textNormaliser;
private final LocationMapper locationMapper;

public SearchLocationService() throws IOException {
public SearchLocationService() {
textTokeniser = new DefaultTextTokeniser();
textNormaliser = new DefaultTextNormaliser();
locationMapper = new DefaultLocationMapper();
Expand Down

0 comments on commit cb72fe4

Please sign in to comment.