Skip to content

Commit daf605b

Browse files
Merge pull request #1975 from aws/staging/b4c6a405-f096-4f46-a8da-144064d36819
Pull request: release <- staging/b4c6a405-f096-4f46-a8da-144064d36819
2 parents 6ff41cb + 8237225 commit daf605b

File tree

498 files changed

+1962
-664
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

498 files changed

+1962
-664
lines changed

.changes/2.17.160.json

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"version": "2.17.160",
3+
"date": "2022-03-30",
4+
"entries": [
5+
{
6+
"type": "bugfix",
7+
"category": "AWS SDK for Java v2",
8+
"contributor": "",
9+
"description": "Fix issue where the `contentLength` specified on the `RequestBody` is not honored. Fixes [#2908](https://github.com/aws/aws-sdk-java-v2/issues/2908)."
10+
},
11+
{
12+
"type": "feature",
13+
"category": "AWS SDK for Java v2",
14+
"contributor": "",
15+
"description": "Remove unnecessary dependencies on JDK modules not in java.base. This didn't remove all of the dependencies on such modules, just the unnecessary ones."
16+
},
17+
{
18+
"type": "feature",
19+
"category": "Amazon Elastic Compute Cloud",
20+
"contributor": "",
21+
"description": "This release simplifies the auto-recovery configuration process enabling customers to set the recovery behavior to disabled or default"
22+
},
23+
{
24+
"type": "feature",
25+
"category": "Firewall Management Service",
26+
"contributor": "",
27+
"description": "AWS Firewall Manager now supports the configuration of third-party policies that can use either the centralized or distributed deployment models."
28+
},
29+
{
30+
"type": "feature",
31+
"category": "AWS IoT",
32+
"contributor": "",
33+
"description": "Doc only update for IoT that fixes customer-reported issues."
34+
},
35+
{
36+
"type": "feature",
37+
"category": "AWS SDK for Java v2",
38+
"contributor": "",
39+
"description": "Extend union type improvements to additional services: dynamodb, dynamodbstreams, iot, sagemaker, clouddirectory, iotanalytics, kendra, marketplaceentitlement, quicksight, s3, xray."
40+
},
41+
{
42+
"type": "feature",
43+
"category": "Amazon FSx",
44+
"contributor": "",
45+
"description": "This release adds support for modifying throughput capacity for FSx for ONTAP file systems."
46+
},
47+
{
48+
"type": "feature",
49+
"category": "AWS IoT Data Plane",
50+
"contributor": "",
51+
"description": "Update the default AWS IoT Core Data Plane endpoint from VeriSign signed to ATS signed. If you have firewalls with strict egress rules, configure the rules to grant you access to data-ats.iot.[region].amazonaws.com or data-ats.iot.[region].amazonaws.com.cn."
52+
}
53+
]
54+
}

CHANGELOG.md

+29
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
# __2.17.160__ __2022-03-30__
2+
## __AWS IoT__
3+
- ### Features
4+
- Doc only update for IoT that fixes customer-reported issues.
5+
6+
## __AWS IoT Data Plane__
7+
- ### Features
8+
- Update the default AWS IoT Core Data Plane endpoint from VeriSign signed to ATS signed. If you have firewalls with strict egress rules, configure the rules to grant you access to data-ats.iot.[region].amazonaws.com or data-ats.iot.[region].amazonaws.com.cn.
9+
10+
## __AWS SDK for Java v2__
11+
- ### Features
12+
- Extend union type improvements to additional services: dynamodb, dynamodbstreams, iot, sagemaker, clouddirectory, iotanalytics, kendra, marketplaceentitlement, quicksight, s3, xray.
13+
- Remove unnecessary dependencies on JDK modules not in java.base. This didn't remove all of the dependencies on such modules, just the unnecessary ones.
14+
15+
- ### Bugfixes
16+
- Fix issue where the `contentLength` specified on the `RequestBody` is not honored. Fixes [#2908](https://github.com/aws/aws-sdk-java-v2/issues/2908).
17+
18+
## __Amazon Elastic Compute Cloud__
19+
- ### Features
20+
- This release simplifies the auto-recovery configuration process enabling customers to set the recovery behavior to disabled or default
21+
22+
## __Amazon FSx__
23+
- ### Features
24+
- This release adds support for modifying throughput capacity for FSx for ONTAP file systems.
25+
26+
## __Firewall Management Service__
27+
- ### Features
28+
- AWS Firewall Manager now supports the configuration of third-party policies that can use either the centralized or distributed deployment models.
29+
130
# __2.17.159__ __2022-03-29__
231
## __AWS Organizations__
332
- ### Features

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ To automatically manage module versions (currently all modules have the same ver
5252
<dependency>
5353
<groupId>software.amazon.awssdk</groupId>
5454
<artifactId>bom</artifactId>
55-
<version>2.17.159</version>
55+
<version>2.17.160</version>
5656
<type>pom</type>
5757
<scope>import</scope>
5858
</dependency>
@@ -86,12 +86,12 @@ Alternatively you can add dependencies for the specific services you use only:
8686
<dependency>
8787
<groupId>software.amazon.awssdk</groupId>
8888
<artifactId>ec2</artifactId>
89-
<version>2.17.159</version>
89+
<version>2.17.160</version>
9090
</dependency>
9191
<dependency>
9292
<groupId>software.amazon.awssdk</groupId>
9393
<artifactId>s3</artifactId>
94-
<version>2.17.159</version>
94+
<version>2.17.160</version>
9595
</dependency>
9696
```
9797

@@ -103,7 +103,7 @@ You can import the whole SDK into your project (includes *ALL* services). Please
103103
<dependency>
104104
<groupId>software.amazon.awssdk</groupId>
105105
<artifactId>aws-sdk-java</artifactId>
106-
<version>2.17.159</version>
106+
<version>2.17.160</version>
107107
</dependency>
108108
```
109109

archetypes/archetype-app-quickstart/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>archetypes</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.17.159</version>
23+
<version>2.17.160</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

archetypes/archetype-lambda/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>archetypes</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.17.159</version>
23+
<version>2.17.160</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626
<artifactId>archetype-lambda</artifactId>

archetypes/archetype-tools/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>archetypes</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.17.159</version>
23+
<version>2.17.160</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

archetypes/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>aws-sdk-java-pom</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.17.159</version>
23+
<version>2.17.160</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626
<artifactId>archetypes</artifactId>

aws-sdk-java/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<parent>
1818
<groupId>software.amazon.awssdk</groupId>
1919
<artifactId>aws-sdk-java-pom</artifactId>
20-
<version>2.17.159</version>
20+
<version>2.17.160</version>
2121
<relativePath>../pom.xml</relativePath>
2222
</parent>
2323
<artifactId>aws-sdk-java</artifactId>

bom-internal/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>aws-sdk-java-pom</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.17.159</version>
23+
<version>2.17.160</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

bom/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<parent>
1818
<groupId>software.amazon.awssdk</groupId>
1919
<artifactId>aws-sdk-java-pom</artifactId>
20-
<version>2.17.159</version>
20+
<version>2.17.160</version>
2121
<relativePath>../pom.xml</relativePath>
2222
</parent>
2323
<artifactId>bom</artifactId>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
package software.amazon.awssdk.buildtools.checkstyle;
17+
18+
import com.puppycrawl.tools.checkstyle.api.AbstractCheck;
19+
import com.puppycrawl.tools.checkstyle.api.DetailAST;
20+
import com.puppycrawl.tools.checkstyle.api.FullIdent;
21+
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
22+
import java.util.Arrays;
23+
import java.util.HashMap;
24+
import java.util.HashSet;
25+
import java.util.List;
26+
import java.util.Set;
27+
import java.util.regex.Pattern;
28+
29+
/**
30+
* Verify that we're not using classes in rt.jar that aren't exported via the java.base module.
31+
*
32+
* If anything fails this check, it increases our module dependencies. If you absolutely must use one of these
33+
* (e.g. java.beans) because it's fundamental to your functionality, you can suppress this checkstyle rule via
34+
* {@link #setLegalPackages(String...)}, but know that it is not free - you're essentially adding a dependency
35+
* for customers that use the module path.
36+
*/
37+
public class NonJavaBaseModuleCheck extends AbstractCheck {
38+
private static final List<String> ILLEGAL_PACKAGES = Arrays.asList(
39+
"java",
40+
"javax",
41+
"sun",
42+
"apple",
43+
"com.apple",
44+
"com.oracle");
45+
46+
private static final Set<String> LEGAL_PACKAGES = new HashSet<>(Arrays.asList(
47+
"java.io",
48+
"java.lang",
49+
"java.lang.annotation",
50+
"java.lang.invoke",
51+
"java.lang.module",
52+
"java.lang.ref",
53+
"java.lang.reflect",
54+
"java.math",
55+
"java.net",
56+
"java.net.spi",
57+
"java.nio",
58+
"java.nio.channels",
59+
"java.nio.channels.spi",
60+
"java.nio.charset",
61+
"java.nio.charset.spi",
62+
"java.nio.file",
63+
"java.nio.file.attribute",
64+
"java.nio.file.spi",
65+
"java.security",
66+
"java.security.acl",
67+
"java.security.cert",
68+
"java.security.interfaces",
69+
"java.security.spec",
70+
"java.text",
71+
"java.text.spi",
72+
"java.time",
73+
"java.time.chrono",
74+
"java.time.format",
75+
"java.time.temporal",
76+
"java.time.zone",
77+
"java.util",
78+
"java.util.concurrent",
79+
"java.util.concurrent.atomic",
80+
"java.util.concurrent.locks",
81+
"java.util.function",
82+
"java.util.jar",
83+
"java.util.regex",
84+
"java.util.spi",
85+
"java.util.stream",
86+
"java.util.jar",
87+
"java.util.zip",
88+
"javax.crypto",
89+
"javax.crypto.interfaces",
90+
"javax.crypto.spec",
91+
"javax.net",
92+
"javax.net.ssl",
93+
"javax.security.auth",
94+
"javax.security.auth.callback",
95+
"javax.security.auth.login",
96+
"javax.security.auth.spi",
97+
"javax.security.auth.x500",
98+
"javax.security.cert"));
99+
100+
private static final Pattern CLASSNAME_START_PATTERN = Pattern.compile("[A-Z]");
101+
102+
private String currentSdkPackage;
103+
104+
private HashMap<String, Set<String>> additionalLegalPackagesBySdkPackage = new HashMap<>();
105+
106+
/**
107+
* Additional legal packages are formatted as "sdk.package.name:jdk.package.name,sdk.package.name2:jdk.package.name2".
108+
* Multiple SDK packages can be repeated.
109+
*/
110+
public void setLegalPackages(String... legalPackages) {
111+
for (String additionalLegalPackage : legalPackages) {
112+
String[] splitPackage = additionalLegalPackage.split(":", 2);
113+
if (splitPackage.length != 2) {
114+
throw new IllegalArgumentException("Invalid legal package definition '" + additionalLegalPackage + "'. Expected"
115+
+ " format is sdk.package.name:jdk.package.name");
116+
}
117+
118+
this.additionalLegalPackagesBySdkPackage.computeIfAbsent(splitPackage[0], k -> new HashSet<>())
119+
.add(splitPackage[1]);
120+
}
121+
}
122+
123+
@Override
124+
public int[] getDefaultTokens() {
125+
return getRequiredTokens();
126+
}
127+
128+
@Override
129+
public int[] getAcceptableTokens() {
130+
return getRequiredTokens();
131+
}
132+
133+
@Override
134+
public int[] getRequiredTokens() {
135+
return new int[] { TokenTypes.IMPORT, TokenTypes.STATIC_IMPORT, TokenTypes.PACKAGE_DEF };
136+
}
137+
138+
@Override
139+
public void visitToken(DetailAST ast) {
140+
if (ast.getType() == TokenTypes.PACKAGE_DEF) {
141+
handlePackageDefToken(ast);
142+
return;
143+
}
144+
145+
handleImportToken(ast);
146+
}
147+
148+
private void handlePackageDefToken(DetailAST ast) {
149+
this.currentSdkPackage = FullIdent.createFullIdent(ast.getLastChild().getPreviousSibling()).getText();
150+
}
151+
152+
private void handleImportToken(DetailAST ast) {
153+
FullIdent importIdentifier;
154+
if (ast.getType() == TokenTypes.IMPORT) {
155+
importIdentifier = FullIdent.createFullIdentBelow(ast);
156+
} else {
157+
importIdentifier = FullIdent.createFullIdent(ast.getFirstChild().getNextSibling());
158+
}
159+
160+
String importText = importIdentifier.getText();
161+
if (isIllegalImport(importText) && !isLegalImport(importText)) {
162+
log(ast, "Import '" + importText + "' uses a JDK class that is not in java.base. This essentially adds an "
163+
+ "additional module dependency. Don't suppress this rule unless it's absolutely required, and only "
164+
+ "suppress the specific package you need via checkstyle.xml instead of suppressing the entire rule.");
165+
}
166+
}
167+
168+
private boolean isIllegalImport(String importText) {
169+
for (String illegalPackage : ILLEGAL_PACKAGES) {
170+
if (importText.startsWith(illegalPackage + ".")) {
171+
return true;
172+
}
173+
}
174+
175+
return false;
176+
}
177+
178+
private boolean isLegalImport(String importText) {
179+
String importPackageWithTrailingDot = CLASSNAME_START_PATTERN.split(importText, 2)[0];
180+
String importPackage = importText.substring(0, importPackageWithTrailingDot.length() - 1);
181+
182+
if (LEGAL_PACKAGES.contains(importPackage)) {
183+
return true;
184+
}
185+
186+
if (additionalLegalPackagesBySdkPackage.entrySet()
187+
.stream()
188+
.anyMatch(e -> currentSdkPackage.startsWith(e.getKey()) &&
189+
e.getValue().contains(importPackage))) {
190+
return true;
191+
}
192+
193+
return false;
194+
}
195+
}

build-tools/src/main/resources/software/amazon/awssdk/checkstyle-suppressions.xml

+3
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,7 @@
5050
<!-- Ignore usage of sslContext.newHandler for NettyUtils.!-->
5151
<suppress checks="Regexp"
5252
files=".*NettyUtils\.java$"/>
53+
54+
<!-- Allow non-java.base usage in tests -->
55+
<suppress checks="software.amazon.awssdk.buildtools.checkstyle.NonJavaBaseModuleCheck" files=".*testutils.*"/>
5356
</suppressions>

0 commit comments

Comments
 (0)