Skip to content

Commit 17f220a

Browse files
Merge pull request #2011 from aws/staging/5af15928-32da-4e4c-b295-79cc1c3d2c91
Pull request: release <- staging/5af15928-32da-4e4c-b295-79cc1c3d2c91
2 parents 1c1a9d1 + 5e5818a commit 17f220a

File tree

452 files changed

+2151
-1127
lines changed

Some content is hidden

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

452 files changed

+2151
-1127
lines changed

.changes/2.17.189.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"version": "2.17.189",
3+
"date": "2022-05-11",
4+
"entries": [
5+
{
6+
"type": "feature",
7+
"category": "AWS Secrets Manager",
8+
"contributor": "",
9+
"description": "Doc only update for Secrets Manager that fixes several customer-reported issues."
10+
},
11+
{
12+
"type": "feature",
13+
"category": "Amazon Elastic Compute Cloud",
14+
"contributor": "",
15+
"description": "This release updates AWS PrivateLink APIs to support IPv6 for PrivateLink Services and Endpoints of type 'Interface'."
16+
}
17+
]
18+
}

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# __2.17.189__ __2022-05-11__
2+
## __AWS Secrets Manager__
3+
- ### Features
4+
- Doc only update for Secrets Manager that fixes several customer-reported issues.
5+
6+
## __Amazon Elastic Compute Cloud__
7+
- ### Features
8+
- This release updates AWS PrivateLink APIs to support IPv6 for PrivateLink Services and Endpoints of type 'Interface'.
9+
110
# __2.17.188__ __2022-05-10__
211
## __AWS Compute Optimizer__
312
- ### Features

README.md

Lines changed: 4 additions & 4 deletions
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.188</version>
55+
<version>2.17.189</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.188</version>
89+
<version>2.17.189</version>
9090
</dependency>
9191
<dependency>
9292
<groupId>software.amazon.awssdk</groupId>
9393
<artifactId>s3</artifactId>
94-
<version>2.17.188</version>
94+
<version>2.17.189</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.188</version>
106+
<version>2.17.189</version>
107107
</dependency>
108108
```
109109

archetypes/archetype-app-quickstart/pom.xml

Lines changed: 1 addition & 1 deletion
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.188</version>
23+
<version>2.17.189</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

archetypes/archetype-lambda/pom.xml

Lines changed: 1 addition & 1 deletion
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.188</version>
23+
<version>2.17.189</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626
<artifactId>archetype-lambda</artifactId>

archetypes/archetype-tools/pom.xml

Lines changed: 1 addition & 1 deletion
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.188</version>
23+
<version>2.17.189</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

archetypes/pom.xml

Lines changed: 1 addition & 1 deletion
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.188</version>
23+
<version>2.17.189</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626
<artifactId>archetypes</artifactId>

aws-sdk-java/pom.xml

Lines changed: 1 addition & 1 deletion
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.188</version>
20+
<version>2.17.189</version>
2121
<relativePath>../pom.xml</relativePath>
2222
</parent>
2323
<artifactId>aws-sdk-java</artifactId>

bom-internal/pom.xml

Lines changed: 1 addition & 1 deletion
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.188</version>
23+
<version>2.17.189</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

bom/pom.xml

Lines changed: 1 addition & 1 deletion
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.188</version>
20+
<version>2.17.189</version>
2121
<relativePath>../pom.xml</relativePath>
2222
</parent>
2323
<artifactId>bom</artifactId>

build-tools/pom.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<plugin>
4949
<groupId>org.codehaus.mojo</groupId>
5050
<artifactId>build-helper-maven-plugin</artifactId>
51-
<version>3.0.0</version>
51+
<version>3.3.0</version>
5252
</plugin>
5353

5454
<plugin>
@@ -60,6 +60,7 @@
6060
</configuration>
6161
</plugin>
6262
</plugins>
63+
6364
</build>
6465

6566
<dependencies>
@@ -68,6 +69,11 @@
6869
<artifactId>checkstyle</artifactId>
6970
<version>8.42</version>
7071
</dependency>
72+
<dependency>
73+
<groupId>com.github.spotbugs</groupId>
74+
<artifactId>spotbugs</artifactId>
75+
<version>4.2.3</version>
76+
</dependency>
7177
</dependencies>
7278

7379
</project>
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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.findbugs;
17+
18+
import edu.umd.cs.findbugs.BugInstance;
19+
import edu.umd.cs.findbugs.BugReporter;
20+
import edu.umd.cs.findbugs.ba.SignatureParser;
21+
import edu.umd.cs.findbugs.bcel.OpcodeStackDetector;
22+
import edu.umd.cs.findbugs.classfile.MethodDescriptor;
23+
import java.util.AbstractMap.SimpleEntry;
24+
import java.util.HashSet;
25+
import java.util.Map.Entry;
26+
import java.util.Set;
27+
import org.apache.bcel.Const;
28+
29+
/**
30+
* Blocks usage of disallowed methods in the SDK.
31+
*/
32+
public class DisallowMethodCall extends OpcodeStackDetector {
33+
private static final Set<Entry<String, String>> PROHIBITED_METHODS = new HashSet<>();
34+
private final BugReporter bugReporter;
35+
36+
static {
37+
PROHIBITED_METHODS.add(new SimpleEntry<>("software/amazon/awssdk/http/SdkHttpHeaders", "headers"));
38+
PROHIBITED_METHODS.add(new SimpleEntry<>("software/amazon/awssdk/http/SdkHttpResponse", "headers"));
39+
PROHIBITED_METHODS.add(new SimpleEntry<>("software/amazon/awssdk/http/SdkHttpRequest", "headers"));
40+
PROHIBITED_METHODS.add(new SimpleEntry<>("software/amazon/awssdk/http/SdkHttpFullRequest", "headers"));
41+
PROHIBITED_METHODS.add(new SimpleEntry<>("software/amazon/awssdk/http/SdkHttpFullResponse", "headers"));
42+
PROHIBITED_METHODS.add(new SimpleEntry<>("software/amazon/awssdk/http/SdkHttpFullRequest$Builder", "headers"));
43+
PROHIBITED_METHODS.add(new SimpleEntry<>("software/amazon/awssdk/http/SdkHttpFullResponse$Builder", "headers"));
44+
PROHIBITED_METHODS.add(new SimpleEntry<>("software/amazon/awssdk/http/SdkHttpRequest", "rawQueryParameters"));
45+
PROHIBITED_METHODS.add(new SimpleEntry<>("software/amazon/awssdk/http/SdkHttpFullRequest", "rawQueryParameters"));
46+
PROHIBITED_METHODS.add(new SimpleEntry<>("software/amazon/awssdk/http/SdkHttpFullRequest$Builder", "rawQueryParameters"));
47+
}
48+
49+
public DisallowMethodCall(BugReporter bugReporter) {
50+
this.bugReporter = bugReporter;
51+
}
52+
53+
@Override
54+
public void sawOpcode(int code) {
55+
switch (code) {
56+
case Const.INVOKEVIRTUAL:
57+
case Const.INVOKESPECIAL:
58+
case Const.INVOKESTATIC:
59+
case Const.INVOKEINTERFACE:
60+
handleMethodCall(code);
61+
return;
62+
default:
63+
// Ignore - not a method call.
64+
}
65+
}
66+
67+
private void handleMethodCall(int code) {
68+
MethodDescriptor method = getMethodDescriptorOperand();
69+
SignatureParser signature = new SignatureParser(method.getSignature());
70+
Entry<String, String> calledMethod = new SimpleEntry<>(method.getSlashedClassName(), method.getName());
71+
if (PROHIBITED_METHODS.contains(calledMethod) && signature.getNumParameters() == 0) {
72+
bugReporter.reportBug(new BugInstance(this, "SDK_BAD_METHOD_CALL", NORMAL_PRIORITY)
73+
.addClassAndMethod(this)
74+
.addSourceLine(this, getPC()));
75+
}
76+
}
77+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
<FindbugsPlugin>
17+
<Detector class="software.amazon.awssdk.buildtools.findbugs.DisallowMethodCall" speed="fast" />
18+
<BugPattern abbrev="BM" type="SDK_BAD_METHOD_CALL" category="PERFORMANCE" />
19+
</FindbugsPlugin>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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+
<MessageCollection>
17+
18+
<Detector class="software.amazon.awssdk.buildtools.findbugs.DisallowMethodCall" >
19+
<Details>This detector checks for method calls that are not allowed for use.</Details>
20+
</Detector>
21+
22+
<BugPattern type="SDK_BAD_METHOD_CALL">
23+
<ShortDescription>Bad method call</ShortDescription>
24+
25+
<LongDescription>
26+
<![CDATA[
27+
{1} uses a method that is prohibited.
28+
The headers() and rawQueryParameters() methods create a deep copy of the data, which can result in
29+
significant memory pressure. Instead of retrieving a copy of the headers to look at it, use methods like
30+
hasHeaders(), firstMatchingHeader(...) or forEachHeader(..) which may be optimized in the type to avoid
31+
copying the data.
32+
]]>
33+
</LongDescription>
34+
35+
<Details>
36+
<![CDATA[
37+
The headers() and rawQueryParameters() methods create a deep copy of the data, which can result in
38+
significant memory pressure. Instead of retrieving a copy of the headers to look at it, use methods like
39+
hasHeaders(), firstMatchingHeader(...) or forEachHeader(..) which may be optimized in the type to avoid
40+
copying the data.
41+
]]>
42+
</Details>
43+
</BugPattern>
44+
45+
<BugCode abbrev="BM">Bad method</BugCode>
46+
</MessageCollection>

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,4 +230,13 @@
230230
<Match>
231231
<Bug pattern="DMI_RANDOM_USED_ONLY_ONCE" />
232232
</Match>
233+
234+
<!-- Uses these methods legitimately. -->
235+
<Match>
236+
<Or>
237+
<Class name="software.amazon.awssdk.http.SdkHttpHeaders"/>
238+
<Class name="software.amazon.awssdk.http.SdkHttpRequest"/>
239+
</Or>
240+
<Bug pattern="SDK_BAD_METHOD_CALL"/>
241+
</Match>
233242
</FindBugsFilter>

bundle/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>software.amazon.awssdk</groupId>
2323
<artifactId>aws-sdk-java-pom</artifactId>
24-
<version>2.17.188</version>
24+
<version>2.17.189</version>
2525
</parent>
2626
<artifactId>bundle</artifactId>
2727
<packaging>jar</packaging>

codegen-lite-maven-plugin/pom.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>software.amazon.awssdk</groupId>
2424
<artifactId>aws-sdk-java-pom</artifactId>
25-
<version>2.17.188</version>
25+
<version>2.17.189</version>
2626
<relativePath>../pom.xml</relativePath>
2727
</parent>
2828
<artifactId>codegen-lite-maven-plugin</artifactId>
@@ -57,6 +57,11 @@
5757
<groupId>software.amazon.awssdk</groupId>
5858
<version>${awsjavasdk.version}</version>
5959
</dependency>
60+
<dependency>
61+
<artifactId>utils</artifactId>
62+
<groupId>software.amazon.awssdk</groupId>
63+
<version>${awsjavasdk.version}</version>
64+
</dependency>
6065
<dependency>
6166
<artifactId>maven-plugin-api</artifactId>
6267
<groupId>org.apache.maven</groupId>

codegen-lite-maven-plugin/src/main/java/software/amazon/awssdk/codegen/lite/maven/plugin/DefaultsModeGenerationMojo.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import software.amazon.awssdk.codegen.lite.defaultsmode.DefaultsLoader;
2828
import software.amazon.awssdk.codegen.lite.defaultsmode.DefaultsModeConfigurationGenerator;
2929
import software.amazon.awssdk.codegen.lite.defaultsmode.DefaultsModeGenerator;
30+
import software.amazon.awssdk.utils.StringUtils;
3031

3132
/**
3233
* The Maven mojo to generate defaults mode related classes.
@@ -61,12 +62,12 @@ public void execute() {
6162
}
6263

6364
public void generateDefaultsModeClass(Path baseSourcesDirectory, DefaultConfiguration configuration) {
64-
Path sourcesDirectory = baseSourcesDirectory.resolve(DEFAULTS_MODE_BASE.replace(".", "/"));
65+
Path sourcesDirectory = baseSourcesDirectory.resolve(StringUtils.replace(DEFAULTS_MODE_BASE, ".", "/"));
6566
new CodeGenerator(sourcesDirectory.toString(), new DefaultsModeGenerator(DEFAULTS_MODE_BASE, configuration)).generate();
6667
}
6768

6869
public void generateDefaultsModeConfiguartionClass(Path baseSourcesDirectory, DefaultConfiguration configuration) {
69-
Path sourcesDirectory = baseSourcesDirectory.resolve(DEFAULTS_MODE_CONFIGURATION_BASE.replace(".", "/"));
70+
Path sourcesDirectory = baseSourcesDirectory.resolve(StringUtils.replace(DEFAULTS_MODE_CONFIGURATION_BASE, ".", "/"));
7071
new CodeGenerator(sourcesDirectory.toString(), new DefaultsModeConfigurationGenerator(DEFAULTS_MODE_CONFIGURATION_BASE,
7172
DEFAULTS_MODE_BASE,
7273
configuration)).generate();

0 commit comments

Comments
 (0)