Source:
<code>private String getTaskFormByTypeAsUser(String containerId, Long taskId, String language, String formType, boolean marshallContent, String userId) { if( config.isRest() ) { Map<String, Object> valuesMap = new HashMap<>(); valuesMap.put(RestURI.CONTAINER_ID, containerId); valuesMap.put(RestURI.TASK_INSTANCE_ID, taskId); String userQuery = StringUtils.isEmpty(userId) ? "" : getUserQueryStr(userId); StringBuilder params = new StringBuilder(userQuery); if (params.length() == 0) { params.append("?"); } else { params.append("&"); } params.append( "type=" ).append( formType ); params.append( "&marshallContent=" ).append( marshallContent ); boolean filter = false; if ( !StringUtils.isEmpty( language ) ) { params.append( "&lang=" ).append( language ); filter = true; } params.append( "&filter=" ).append( filter ); return makeHttpGetRequestAndCreateRawResponse( build(loadBalancer.getUrl(), FORM_URI + "/" + TASK_FORM_GET_URI, valuesMap) + params.toString()); } else { CommandScript script = new CommandScript(Collections.singletonList( (KieServerCommand) new DescriptorCommand("FormService", "getFormDisplayTask", <START> containerId, taskId, userId, StringUtils.defaultString(language), !StringUtils.isEmpty(language), formType))); <END> ServiceResponse<String> response = (ServiceResponse<String>) executeJmsCommand(script, DescriptorCommand.class.getName(), "BPM-UI", containerId).getResponses().get(0); throwExceptionOnFailure(response); if (shouldReturnWithNullResponse(response)) { return null; } return response.getResult(); } }</code><technical_language>Well, I Object[] implementation consistent other methods ignore this SonarCloud warning</technical_language>

Target:
private String getTaskFormByTypeAsUser(String containerId, Long taskId, String language, String formType, boolean marshallContent, String userId) { if( config.isRest() ) { Map<String, Object> valuesMap = new HashMap<>(); valuesMap.put(RestURI.CONTAINER_ID, containerId); valuesMap.put(RestURI.TASK_INSTANCE_ID, taskId); String userQuery = StringUtils.isEmpty(userId) ? "" : getUserQueryStr(userId); StringBuilder params = new StringBuilder(userQuery); if (params.length() == 0) { params.append("?"); } else { params.append("&"); } params.append( "type=" ).append( formType ); params.append( "&marshallContent=" ).append( marshallContent ); boolean filter = false; if ( !StringUtils.isEmpty( language ) ) { params.append( "&lang=" ).append( language ); filter = true; } params.append( "&filter=" ).append( filter ); return makeHttpGetRequestAndCreateRawResponse( build(loadBalancer.getUrl(), FORM_URI + "/" + TASK_FORM_GET_URI, valuesMap) + params.toString()); } else { CommandScript script = new CommandScript(Collections.singletonList( (KieServerCommand) new DescriptorCommand("FormService", "getFormDisplayTask", new Object[]{containerId, taskId, StringUtils.defaultString(userId), StringUtils.defaultString(language), !StringUtils.isEmpty(language), formType}))); ServiceResponse<String> response = (ServiceResponse<String>) executeJmsCommand(script, DescriptorCommand.class.getName(), "BPM-UI", containerId).getResponses().get(0); throwExceptionOnFailure(response); if (shouldReturnWithNullResponse(response)) { return null; } return response.getResult(); } }