Duplicate code

Oct 22, 2013 at 6:18 PM
Edited Oct 22, 2013 at 6:19 PM
in multiple places this line of code is repeated...
############Duplicate code################  
      If ([string]::IsNullOrEmpty($dbServer))
        {
            $dbServer = $xmlinput.Configuration.Farm.Database.DBServer
        }
#######################################

        $serviceDB = $dbPrefix+$serviceConfig.Database.Name
        $dbServer = $serviceConfig.Database.DBServer
        # If we haven't specified a DB Server then just use the default used by the Farm
        If ([string]::IsNullOrEmpty($dbServer))
        {
            $dbServer = $xmlinput.Configuration.Farm.Database.DBServer
        }
Coordinator
Oct 22, 2013 at 6:34 PM
Yes... it is...
Coordinator
Nov 4, 2013 at 2:52 AM
I think I know what you mean now - the code is repeated in rapid succession, and not just throughout the script. This should be cleaned up in the next check-in.

Brian
Coordinator
Nov 19, 2013 at 4:19 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.