Skip to content

Commit

Permalink
Merge pull request #936 from aws/staging/7adc3506-a831-46f5-a70a-6218…
Browse files Browse the repository at this point in the history
…4c34b592

Pull request: release <- staging/7adc3506-a831-46f5-a70a-62184c34b592
  • Loading branch information
aws-sdk-java-automation authored Aug 24, 2020
2 parents 88966b9 + 95fa36d commit 17e85f3
Show file tree
Hide file tree
Showing 297 changed files with 1,528 additions and 561 deletions.
51 changes: 51 additions & 0 deletions .changes/2.14.4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"version": "2.14.4",
"date": "2020-08-24",
"entries": [
{
"type": "feature",
"category": "AWS IoT SiteWise",
"description": "Add traversalDirection to ListAssociatedAssetsRequest and add portal status to ListPortalsResponse"
},
{
"type": "feature",
"category": "Amazon CloudWatch Logs",
"description": "Documentation updates for CloudWatch Logs"
},
{
"type": "feature",
"category": "Managed Streaming for Kafka",
"description": "Add UpdateConfiguration and DeleteConfiguration operations."
},
{
"type": "bugfix",
"category": "AWS SDK for Java v2",
"description": "For JSON protocols, when unmarshalling a response, if a member is declared to be located in the URI, the member is treated as being located in the payload instead."
},
{
"type": "feature",
"category": "Amazon Simple Systems Manager (SSM)",
"description": "Add string length constraints to OpsDataAttributeName and OpsFilterValue."
},
{
"type": "feature",
"category": "AWS Database Migration Service",
"description": "Added new endpoint settings to include columns with Null and Empty value when using Kinesis and Kafka as target. Added a new endpoint setting to set maximum message size when using Kafka as target."
},
{
"type": "feature",
"category": "Amazon Elastic Compute Cloud",
"description": "This release enables customers to use VPC prefix lists in their transit gateway route tables, and it adds support for Provisioned IOPS SSD (io2) EBS volumes."
},
{
"type": "feature",
"category": "AWS X-Ray",
"description": "AWS X-Ray now supports tagging on sampling rules and groups."
},
{
"type": "feature",
"category": "AWS SDK for Java v2",
"description": "Updated service endpoint metadata."
}
]
}
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
# __2.14.4__ __2020-08-24__
## __AWS Database Migration Service__
- ### Features
- Added new endpoint settings to include columns with Null and Empty value when using Kinesis and Kafka as target. Added a new endpoint setting to set maximum message size when using Kafka as target.

## __AWS IoT SiteWise__
- ### Features
- Add traversalDirection to ListAssociatedAssetsRequest and add portal status to ListPortalsResponse

## __AWS SDK for Java v2__
- ### Features
- Updated service endpoint metadata.

- ### Bugfixes
- For JSON protocols, when unmarshalling a response, if a member is declared to be located in the URI, the member is treated as being located in the payload instead.

## __AWS X-Ray__
- ### Features
- AWS X-Ray now supports tagging on sampling rules and groups.

## __Amazon CloudWatch Logs__
- ### Features
- Documentation updates for CloudWatch Logs

## __Amazon Elastic Compute Cloud__
- ### Features
- This release enables customers to use VPC prefix lists in their transit gateway route tables, and it adds support for Provisioned IOPS SSD (io2) EBS volumes.

## __Amazon Simple Systems Manager (SSM)__
- ### Features
- Add string length constraints to OpsDataAttributeName and OpsFilterValue.

## __Managed Streaming for Kafka__
- ### Features
- Add UpdateConfiguration and DeleteConfiguration operations.

# __2.14.3__ __2020-08-20__
## __Amazon Chime__
- ### Features
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ To automatically manage module versions (currently all modules have the same ver
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>2.14.3</version>
<version>2.14.4</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -83,12 +83,12 @@ Alternatively you can add dependencies for the specific services you use only:
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>ec2</artifactId>
<version>2.14.3</version>
<version>2.14.4</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
<version>2.14.3</version>
<version>2.14.4</version>
</dependency>
```

Expand All @@ -100,7 +100,7 @@ You can import the whole SDK into your project (includes *ALL* services). Please
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java</artifactId>
<version>2.14.3</version>
<version>2.14.4</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion archetypes/archetype-lambda/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>archetypes</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.14.3</version>
<version>2.14.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archetype-lambda</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion archetypes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>aws-sdk-java-pom</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.14.3</version>
<version>2.14.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archetypes</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-sdk-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.14.3</version>
<version>2.14.4</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>aws-sdk-java</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion bom-internal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>aws-sdk-java-pom</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.14.3</version>
<version>2.14.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.14.3</version>
<version>2.14.4</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>bom</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.14.3</version>
<version>2.14.4</version>
</parent>
<artifactId>bundle</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion codegen-lite-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.14.3</version>
<version>2.14.4</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>codegen-lite-maven-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion codegen-lite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.14.3</version>
<version>2.14.4</version>
</parent>
<artifactId>codegen-lite</artifactId>
<name>AWS Java SDK :: Code Generator Lite</name>
Expand Down
2 changes: 1 addition & 1 deletion codegen-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.14.3</version>
<version>2.14.4</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>codegen-maven-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion codegen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.14.3</version>
<version>2.14.4</version>
</parent>
<artifactId>codegen</artifactId>
<name>AWS Java SDK :: Code Generator</name>
Expand Down
2 changes: 1 addition & 1 deletion core/annotations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>core</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.14.3</version>
<version>2.14.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/arns/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>core</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.14.3</version>
<version>2.14.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>core</artifactId>
<version>2.14.3</version>
<version>2.14.4</version>
</parent>

<artifactId>auth</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/aws-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>core</artifactId>
<version>2.14.3</version>
<version>2.14.4</version>
</parent>

<artifactId>aws-core</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/metrics-spi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>core</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.14.3</version>
<version>2.14.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>aws-sdk-java-pom</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.14.3</version>
<version>2.14.4</version>
</parent>

<artifactId>core</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/profiles/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>core</artifactId>
<version>2.14.3</version>
<version>2.14.4</version>
</parent>

<artifactId>profiles</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/protocols/aws-cbor-protocol/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>protocols</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.14.3</version>
<version>2.14.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/protocols/aws-ion-protocol/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>protocols</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.14.3</version>
<version>2.14.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/protocols/aws-json-protocol/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>protocols</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.14.3</version>
<version>2.14.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

package software.amazon.awssdk.protocols.json.internal;

import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.core.protocol.MarshallLocation;

@SdkInternalApi
public final class MarshallerUtil {
private MarshallerUtil() {
}

/**
* @return true if the location is in the URI, false otherwise.
*/
public static boolean locationInUri(MarshallLocation location) {
switch (location) {
case PATH:
case QUERY_PARAM:
return true;
default:
return false;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import software.amazon.awssdk.http.SdkHttpFullResponse;
import software.amazon.awssdk.protocols.core.StringToInstant;
import software.amazon.awssdk.protocols.core.StringToValueConverter;
import software.amazon.awssdk.protocols.json.internal.MarshallerUtil;
import software.amazon.awssdk.protocols.json.internal.dom.JsonDomParser;
import software.amazon.awssdk.protocols.json.internal.dom.SdkJsonNode;
import software.amazon.awssdk.utils.builder.Buildable;
Expand Down Expand Up @@ -163,7 +164,7 @@ public T unmarshall(JsonUnmarshallerContext context,

public <TypeT extends SdkPojo> TypeT unmarshall(SdkPojo sdkPojo,
SdkHttpFullResponse response) throws IOException {
if (hasPayloadMembers(sdkPojo) && !hasExplicitBlobPayloadMember(sdkPojo)) {
if (hasPayloadMembersOnUnmarshall(sdkPojo) && !hasExplicitBlobPayloadMember(sdkPojo)) {
SdkJsonNode jsonNode = parser.parse(ReleasableInputStream.wrap(response.content().orElse(null)).disableClose());
return unmarshall(sdkPojo, response, jsonNode);
} else {
Expand All @@ -181,10 +182,11 @@ private static boolean isExplicitPayloadMember(SdkField<?> f) {
return f.containsTrait(PayloadTrait.class);
}

private boolean hasPayloadMembers(SdkPojo sdkPojo) {
private boolean hasPayloadMembersOnUnmarshall(SdkPojo sdkPojo) {
return sdkPojo.sdkFields()
.stream()
.anyMatch(f -> f.location() == MarshallLocation.PAYLOAD);
.stream()
.anyMatch(f -> f.location() == MarshallLocation.PAYLOAD
|| MarshallerUtil.locationInUri(f.location()));
}

public <TypeT extends SdkPojo> TypeT unmarshall(SdkPojo sdkPojo,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.http.SdkHttpFullResponse;
import software.amazon.awssdk.protocols.json.internal.MarshallerUtil;

/**
* Dependencies needed by implementations of {@link JsonUnmarshaller}.
Expand Down Expand Up @@ -51,6 +52,11 @@ public SdkHttpFullResponse response() {
* @throws SdkClientException if no unmarshaller is found.
*/
public JsonUnmarshaller<Object> getUnmarshaller(MarshallLocation location, MarshallingType<?> marshallingType) {
// A member being in the URI on a response is nonsensical; when a member is declared to be somewhere in the URI,
// it should be found in the payload on response
if (MarshallerUtil.locationInUri(location)) {
location = MarshallLocation.PAYLOAD;
}
return unmarshallerRegistry.getUnmarshaller(location, marshallingType);
}

Expand Down
Loading

0 comments on commit 17e85f3

Please sign in to comment.