View Issue Details

IDProjectCategoryView StatusLast Update
0001957SymmetricDSBugpublic2019-05-08 14:56
Reportervilius Assigned Toelong  
Prioritylow 
Status closedResolutionfixed 
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 11: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);
         }
aps_redundant_cond.patch (827 bytes)   

Related Changesets

SymmetricDS: 3.10 60e27786

2019-04-23 14:55:28

admin

Details Diff
0001957: Redundant condition in AbstractParameterService.getString Affected Issues
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 11:44 vilius New Issue
2014-09-08 11:44 vilius File Added: aps_redundant_cond.patch
2019-04-23 18:55 elong Assigned To => elong
2019-04-23 18:55 elong Status new => resolved
2019-04-23 18:55 elong Resolution open => fixed
2019-04-23 18:55 elong Fixed in Version => 3.10.2
2019-04-23 18:56 elong Target Version => 3.10.2
2019-04-23 19:00 admin Changeset attached => SymmetricDS 3.10 60e27786
2019-05-08 14:56 admin Status resolved => closed