From b7ede91bb3d6667ae75e8361985ae27eb383e7e8 Mon Sep 17 00:00:00 2001 From: tomaytotomato <971697+tomaytotomato@users.noreply.github.com> Date: Sun, 11 Aug 2024 15:56:27 +0100 Subject: [PATCH] Sonarlint fixes --- .../main/java/com/tomaytotomato/SearchLocationService.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/location4j/src/main/java/com/tomaytotomato/SearchLocationService.java b/location4j/src/main/java/com/tomaytotomato/SearchLocationService.java index b0ede83..6a734f4 100644 --- a/location4j/src/main/java/com/tomaytotomato/SearchLocationService.java +++ b/location4j/src/main/java/com/tomaytotomato/SearchLocationService.java @@ -102,7 +102,7 @@ private static Location buildLocationResult(Country topCountry, State topState, public void buildDataStructures() { countries.forEach(country -> { buildCountryLookups(country); - country.getStates().forEach(state -> buildStateLookups(state, country)); + country.getStates().forEach(this::buildStateLookups); }); addAliases(); } @@ -156,9 +156,8 @@ private void buildCountryLookups(Country country) { * Maps state and its associated cities to various lookup maps. * * @param state The state to be mapped. - * @param country The country the state belongs to. */ - private void buildStateLookups(State state, Country country) { + private void buildStateLookups(State state) { stateIdToStateMap.put(state.getId(), state); stateNameToStatesMap.computeIfAbsent(keyMaker(state.getName()), k -> new ArrayList<>()) .add(state);