remove unneeded null checks
@@ -860,16 +860,9 @@ public class EmrDaoImpl implements EmrDao
{
// Create a new job flow instances configuration object.
JobFlowInstancesConfig jobFlowInstancesConfig = new JobFlowInstancesConfig();
-
- if (emrClusterDefinition.getMasterSecurityGroup() != null)
- {
+ // Set up master/slave security group
jobFlowInstancesConfig.setEmrManagedMasterSecurityGroup(emrClusterDefinition.getMasterSecurityGroup());
- }
-
- if (emrClusterDefinition.getSlaveSecurityGroup() != null)
- {
jobFlowInstancesConfig.setEmrManagedSlaveSecurityGroup(emrClusterDefinition.getSlaveSecurityGroup());
- }
// Add additional security groups to master nodes.
jobFlowInstancesConfig.setAdditionalMasterSecurityGroups(emrClusterDefinition.getAdditionalMasterSecurityGroups());
