Source:
public MesosSlaveInfo( String labelString, Mode mode, String slaveCpus, String slaveMem, String minExecutors, String maxExecutors, String executorCpus, String executorMem, String remoteFSRoot, String idleTerminationMinutes, String slaveAttributes, String jvmArgs, String jnlpArgs, String defaultSlave, ContainerInfo containerInfo, List<URI> additionalURIs, List<? extends NodeProperty<?>> nodeProperties) throws IOException, NumberFormatException { this.slaveCpus = Double.parseDouble(slaveCpus); this.slaveMem = Integer.parseInt(slaveMem); this.maxExecutors = Integer.parseInt(maxExecutors); this.executorCpus = Double.parseDouble(executorCpus); this.executorMem = Integer.parseInt(executorMem); this.remoteFSRoot = StringUtils.isNotBlank(remoteFSRoot) ? remoteFSRoot .trim() : "jenkins"; this.idleTerminationMinutes = Integer.parseInt(idleTerminationMinutes); this.labelString = Util.fixEmptyAndTrim(labelString); this.mode = mode != null ? mode : Mode.NORMAL; this.jvmArgs = StringUtils.isNotBlank(jvmArgs) ? cleanseJvmArgs(jvmArgs) : DEFAULT_JVM_ARGS; this.jnlpArgs = StringUtils.isNotBlank(jnlpArgs) ? jnlpArgs : ""; this.defaultSlave = Boolean.valueOf(defaultSlave); this.containerInfo = containerInfo; this.additionalURIs = additionalURIs; this.nodeProperties.replaceBy(nodeProperties == null ? new ArrayList<NodeProperty<?>>() : nodeProperties); int minExecutorsVal = Integer.parseInt(minExecutors); this.minExecutors = minExecutorsVal < 1 || minExecutorsVal > this.maxExecutors ? 1 : minExecutorsVal; JSONObject jsonObject = null; if (StringUtils.isNotBlank(slaveAttributes)) { try { jsonObject = (JSONObject) JSONSerializer.toJSON(slaveAttributes); } catch (JSONException e) { LOGGER.warning("Ignoring Mesos slave attributes JSON due to parsing error : " + slaveAttributes); } } this.slaveAttributes = jsonObject; }

Target:
public MesosSlaveInfo( String labelString, Mode mode, String slaveCpus, String slaveMem, String minExecutors, String maxExecutors, String executorCpus, String executorMem, String remoteFSRoot, String idleTerminationMinutes, String slaveAttributes, String jvmArgs, String jnlpArgs, String defaultSlave, ContainerInfo containerInfo, List<URI> additionalURIs, List<? extends NodeProperty<?>> nodeProperties) throws IOException, NumberFormatException { this.slaveCpus = Double.parseDouble(slaveCpus); this.slaveMem = Integer.parseInt(slaveMem); this.maxExecutors = Integer.parseInt(maxExecutors); this.executorCpus = Double.parseDouble(executorCpus); this.executorMem = Integer.parseInt(executorMem); this.remoteFSRoot = StringUtils.isNotBlank(remoteFSRoot) ? remoteFSRoot .trim() : "jenkins"; this.idleTerminationMinutes = Integer.parseInt(idleTerminationMinutes); this.labelString = Util.fixEmptyAndTrim(labelString); this.mode = mode != null ? mode : Mode.NORMAL; this.jvmArgs = StringUtils.isNotBlank(jvmArgs) ? cleanseJvmArgs(jvmArgs) : DEFAULT_JVM_ARGS; this.jnlpArgs = StringUtils.isNotBlank(jnlpArgs) ? jnlpArgs : ""; this.defaultSlave = Boolean.valueOf(defaultSlave); this.containerInfo = containerInfo; this.additionalURIs = additionalURIs; this.nodeProperties.replaceBy(nodeProperties == null ? new ArrayList<NodeProperty<?>>() : nodeProperties); int minExecutorsVal = Integer.parseInt(minExecutors); this.minExecutors = minExecutorsVal < 1 ? 1 : minExecutorsVal; JSONObject jsonObject = null; if (StringUtils.isNotBlank(slaveAttributes)) { try { jsonObject = (JSONObject) JSONSerializer.toJSON(slaveAttributes); } catch (JSONException e) { LOGGER.warning("Ignoring Mesos slave attributes JSON due to parsing error : " + slaveAttributes); } } this.slaveAttributes = jsonObject; }