diff --git a/build.gradle b/build.gradle index da7abb7..284cdd3 100644 --- a/build.gradle +++ b/build.gradle @@ -30,13 +30,13 @@ ext { commonsIoVersion='2.4' jacocoVersion = '0.7.2.201409121644' slf4jVersion = '1.7.8' - springCloudAwsVersion = '1.0.0.RELEASE' - springIntegrationVersion = '4.1.2.RELEASE' + springCloudAwsVersion = '1.0.3.RELEASE' + springIntegrationVersion = '4.1.6.RELEASE' idPrefix = 'aws' linkHomepage = 'https://github.com/spring-projects/spring-integration-aws' - linkCi = 'https://build.spring.io/browse/INTEXT' + linkCi = 'https://build.spring.io/browse/INTEXT-AWS' linkIssue = 'https://jira.spring.io/browse/INTEXT' linkScmUrl = 'https://github.com/spring-projects/spring-integration-aws' linkScmConnection = 'https://github.com/spring-projects/spring-integration-aws.git' diff --git a/src/main/java/org/springframework/integration/aws/outbound/SqsMessageHandler.java b/src/main/java/org/springframework/integration/aws/outbound/SqsMessageHandler.java index 23cf639..6126de0 100644 --- a/src/main/java/org/springframework/integration/aws/outbound/SqsMessageHandler.java +++ b/src/main/java/org/springframework/integration/aws/outbound/SqsMessageHandler.java @@ -22,7 +22,7 @@ import org.springframework.expression.EvaluationContext; import org.springframework.expression.Expression; import org.springframework.expression.common.LiteralExpression; import org.springframework.integration.aws.support.AwsHeaders; -import org.springframework.integration.expression.IntegrationEvaluationContextAware; +import org.springframework.integration.context.IntegrationContextUtils; import org.springframework.integration.handler.AbstractMessageHandler; import org.springframework.messaging.Message; import org.springframework.util.Assert; @@ -35,11 +35,12 @@ import com.amazonaws.services.sqs.AmazonSQS; * * @author Artem Bilan * @author Rahul Pilani + * @author Taylor Wicksell * * @see QueueMessagingTemplate * @see org.springframework.cloud.aws.messaging.core.QueueMessageChannel */ -public class SqsMessageHandler extends AbstractMessageHandler implements IntegrationEvaluationContextAware { +public class SqsMessageHandler extends AbstractMessageHandler { private final QueueMessagingTemplate template; @@ -70,14 +71,10 @@ public class SqsMessageHandler extends AbstractMessageHandler implements Integra this.queueExpression = queueExpression; } - @Override - public void setIntegrationEvaluationContext(EvaluationContext evaluationContext) { - this.evaluationContext = evaluationContext; - } - @Override protected void onInit() throws Exception { - Assert.notNull(this.evaluationContext); + super.onInit(); + this.evaluationContext = IntegrationContextUtils.getEvaluationContext(getBeanFactory()); } @Override @@ -93,3 +90,4 @@ public class SqsMessageHandler extends AbstractMessageHandler implements Integra } } + diff --git a/src/test/java/org/springframework/integration/aws/s3/core/AbstractAmazonS3OperationsImplAWSTests.java b/src/test/java/org/springframework/integration/aws/s3/core/AbstractAmazonS3OperationsImplAWSTests.java index 4f294c4..a48c67f 100644 --- a/src/test/java/org/springframework/integration/aws/s3/core/AbstractAmazonS3OperationsImplAWSTests.java +++ b/src/test/java/org/springframework/integration/aws/s3/core/AbstractAmazonS3OperationsImplAWSTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -76,7 +76,7 @@ public abstract class AbstractAmazonS3OperationsImplAWSTests { private static PropertiesAWSCredentials credentials; @BeforeClass - public static final void setup() throws Exception { + public static void setup() throws Exception { AWSCredentials credentials = getCredentials(); client = new AmazonS3Client( new BasicAWSCredentials(credentials.getAccessKey(), credentials.getSecretKey())); @@ -386,9 +386,9 @@ public abstract class AbstractAmazonS3OperationsImplAWSTests { //lets verify the object's ACL AccessControlList acls = getObjectACL(BUCKET_NAME, key); - Set grants = acls.getGrants(); + List grants = acls.getGrantsAsList(); boolean isACLValid = false; - for(Grant g:grants) { + for(Grant g : grants) { com.amazonaws.services.s3.model.Grantee grantee = g.getGrantee(); if(VALID_CANONICAL_ID.equals(grantee.getIdentifier()) && "READ_ACP".equals(grant.getPermission().toString())) {