From 096e7edde7e863592ea3d9fb4b26c4828e28fafd Mon Sep 17 00:00:00 2001 From: Gennadiy Anisimov Date: Tue, 30 Jul 2024 17:31:59 +0300 Subject: [PATCH] Fix putting constant on left side of equality operator --- .../service/converters/SourceRequestToSourceConverter.java | 2 +- src/main/java/org/ohdsi/webapi/source/SourceController.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/ohdsi/webapi/service/converters/SourceRequestToSourceConverter.java b/src/main/java/org/ohdsi/webapi/service/converters/SourceRequestToSourceConverter.java index af4a0d631..3dafe0a68 100644 --- a/src/main/java/org/ohdsi/webapi/service/converters/SourceRequestToSourceConverter.java +++ b/src/main/java/org/ohdsi/webapi/service/converters/SourceRequestToSourceConverter.java @@ -29,7 +29,7 @@ public Source convert(SourceRequest request) { source.setKeyfileName(request.getKeyfileName()); source.setKrbAdminServer(request.getKrbAdminServer()); source.setKrbAuthMethod(KerberosAuthMechanism.getByName(request.getKrbAuthMethod())); - if (null != request.isCheckConnection()) { + if (request.isCheckConnection() != null) { source.setCheckConnection(request.isCheckConnection()); } return source; diff --git a/src/main/java/org/ohdsi/webapi/source/SourceController.java b/src/main/java/org/ohdsi/webapi/source/SourceController.java index 9a2b24d94..ee32d2f4d 100644 --- a/src/main/java/org/ohdsi/webapi/source/SourceController.java +++ b/src/main/java/org/ohdsi/webapi/source/SourceController.java @@ -238,7 +238,7 @@ public SourceInfo updateSource(@PathParam("sourceId") Integer sourceId, @FormDat } setKeyfileData(updated, source, file); transformIfRequired(updated); - if (null == request.isCheckConnection()) { + if (request.isCheckConnection() == null) { updated.setCheckConnection(source.isCheckConnection()); } updated.setModifiedBy(getCurrentUser());