Remove IntEvalCtxAware usage for SI 4.2 support
Polishing
This commit is contained in:
committed by
Artem Bilan
parent
716f63e3a9
commit
e6e4a0b2d1
@@ -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'
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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<Grant> grants = acls.getGrants();
|
||||
List<Grant> 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())) {
|
||||
|
||||
Reference in New Issue
Block a user