View Issue Details

IDProjectCategoryView StatusLast Update
0001957SymmetricDSBugpublic2019-05-08 10:56
ReporterviliusAssigned Toelong 
Prioritylow 
Status closedResolutionfixed 
Product Version 
Target Version3.10.2Fixed in Version3.10.2 
Summary0001957: Redundant condition in AbstractParameterService.getString
DescriptionAs value is initialised to null, the first condition always evaluates to true making it redundant. Please find the patch attached.
TagsNo tags attached.

Activities

vilius

2014-09-08 07:44

reporter  

aps_redundant_cond.patch (827 bytes)
Index: symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/AbstractParameterService.java
===================================================================
--- symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/AbstractParameterService.java	(revision 8666)
+++ symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/AbstractParameterService.java	(working copy)
@@ -112,12 +112,8 @@
     }
 
     public String getString(String key, String defaultVal) {
-        String value = null;
+        String value = getParameters().get(key, defaultVal);
 
-        if (StringUtils.isBlank(value)) {
-            value = getParameters().get(key, defaultVal);
-        }
-
         if (this.parameterFilter != null) {
             value = this.parameterFilter.filterParameter(key, value);
         }

Related Changesets

SymmetricDS: 3.10 60e27786

2019-04-23 14:55:28

admin

Details Diff
0001957: Redundant condition in AbstractParameterService.getString
0001957
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/AbstractParameterService.java Diff File

Issue History

Date Modified Username Field Change
2014-09-08 07:44 vilius New Issue
2014-09-08 07:44 vilius File Added: aps_redundant_cond.patch
2019-04-23 14:55 elong Assigned To => elong
2019-04-23 14:55 elong Status new => resolved
2019-04-23 14:55 elong Resolution open => fixed
2019-04-23 14:55 elong Fixed in Version => 3.10.2
2019-04-23 14:56 elong Target Version => 3.10.2
2019-04-23 15:00 admin Changeset attached => SymmetricDS 3.10 60e27786
2019-05-08 10:56 admin Status resolved => closed