Skip to content

Commit

Permalink
sonar bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
SrdjanStevanetic committed Nov 2, 2023
1 parent b7abbd7 commit f30ff13
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

Expand Down Expand Up @@ -48,8 +49,9 @@ public void saveRedisCache(String sourceLang, String targetLang, List<String> in
}

public void deleteAll() {
if(redisTemplate.getConnectionFactory()!=null) {
redisTemplate.getConnectionFactory().getConnection().flushAll();
RedisConnectionFactory connFact=redisTemplate.getConnectionFactory();
if(connFact!=null) {
connFact.getConnection().flushAll();
}
}

Expand Down

0 comments on commit f30ff13

Please sign in to comment.