Source:
<code>protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception { SqsConfiguration configuration = new SqsConfiguration(); setProperties(configuration, parameters); if (remaining == null || remaining.trim().length() == 0) { throw new IllegalArgumentException("Queue name must be specified."); } if (remaining.startsWith("arn:")) { String[] parts = remaining.split(":"); if (parts.length != 6 || !parts[2].equals("sqs")) { throw new IllegalArgumentException("Queue arn must be in format arn:aws:sqs:region:account:name."); } configuration.setRegion(parts[3]); configuration.setQueueOwnerAWSAccountId(parts[4]); configuration.setQueueName(parts[5]); } else { configuration.setQueueName(remaining); } if (configuration.getAmazonSQSClient() == null && (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) { throw new IllegalArgumentException("AmazonSQSClient or accessKey and secretKey must be specified."); } if (configuration.isExtendMessageVisibility() && (configuration.getVisibilityTimeout() == null)) { throw new IllegalArgumentException("Extending message visibility (extendMessageVisibility) requires visibilityTimeout to be set on the Endpoint."); } <START> if (configuration.isFifoQueue() && configuration.getMessageGroupIdStrategy() == null) { <END> throw new IllegalArgumentException("messageGroupIdStrategy must be set for FIFO queues."); } SqsEndpoint sqsEndpoint = new SqsEndpoint(uri, this, configuration); sqsEndpoint.setConsumerProperties(parameters); return sqsEndpoint; }</code><technical_language>ObjectHelper instead of null checking</technical_language>

Target:
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception { SqsConfiguration configuration = new SqsConfiguration(); setProperties(configuration, parameters); if (remaining == null || remaining.trim().length() == 0) { throw new IllegalArgumentException("Queue name must be specified."); } if (remaining.startsWith("arn:")) { String[] parts = remaining.split(":"); if (parts.length != 6 || !parts[2].equals("sqs")) { throw new IllegalArgumentException("Queue arn must be in format arn:aws:sqs:region:account:name."); } configuration.setRegion(parts[3]); configuration.setQueueOwnerAWSAccountId(parts[4]); configuration.setQueueName(parts[5]); } else { configuration.setQueueName(remaining); } if (configuration.getAmazonSQSClient() == null && (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) { throw new IllegalArgumentException("AmazonSQSClient or accessKey and secretKey must be specified."); } if (configuration.isExtendMessageVisibility() && (configuration.getVisibilityTimeout() == null)) { throw new IllegalArgumentException("Extending message visibility (extendMessageVisibility) requires visibilityTimeout to be set on the Endpoint."); } if (configuration.isFifoQueue() && ObjectHelper.isEmpty(configuration.getMessageGroupIdStrategy())) { throw new IllegalArgumentException("messageGroupIdStrategy must be set for FIFO queues."); } SqsEndpoint sqsEndpoint = new SqsEndpoint(uri, this, configuration); sqsEndpoint.setConsumerProperties(parameters); return sqsEndpoint; }