Use comparison operator rather than equals for enums in Dagger modules

Fixes SPP_EQUALS_ON_ENUM issue from SpotBugs.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2022-11-14 01:46:34 +01:00 committed by Tim Krüger
parent fb0fe8587a
commit 9e967bdd4d
No known key found for this signature in database
GPG Key ID: FECE3A7222C52A4E

View File

@ -299,7 +299,7 @@ public class RestModule {
@Override
public void run() {
if (Proxy.Type.SOCKS.equals(Proxy.Type.valueOf(appPreferences.getProxyType()))) {
if (Proxy.Type.valueOf(appPreferences.getProxyType()) == Proxy.Type.SOCKS) {
proxy = new Proxy(Proxy.Type.valueOf(appPreferences.getProxyType()),
InetSocketAddress.createUnresolved(appPreferences.getProxyHost(), Integer.parseInt(
appPreferences.getProxyPort())));