Skip to content

Commit

Permalink
Don't check the continuation sequence number if it's null (#426)
Browse files Browse the repository at this point in the history
Would cause shard end handling to fail.

Also advanced the version
  • Loading branch information
pfifer authored Sep 27, 2018
1 parent 47dcfdb commit f3b0dad
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion amazon-kinesis-client-multilang/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<artifactId>amazon-kinesis-client-pom</artifactId>
<groupId>software.amazon.kinesis</groupId>
<version>2.0.3-experimental-6</version>
<version>2.0.3-experimental-7</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion amazon-kinesis-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>software.amazon.kinesis</groupId>
<artifactId>amazon-kinesis-client-pom</artifactId>
<version>2.0.3-experimental-6</version>
<version>2.0.3-experimental-7</version>
</parent>

<artifactId>amazon-kinesis-client</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,13 @@ protected void validateRecords(String shardId, SubscribeToShardEvent event) {
throw new IllegalArgumentException(mismatchReport);
}

Map<String, Integer> continuationMismatch = mismatchedRecordReporter.recordsNotForShard(shardId, Stream.of(event.continuationSequenceNumber()));
if (!continuationMismatch.isEmpty()) {
String continuationReport = "Continuation sequence number not matched to shard: " + mismatchedRecordReporter.makeReport(continuationMismatch);
log.error(continuationReport);
throw new IllegalArgumentException(continuationReport);
if (event.continuationSequenceNumber() != null) {
Map<String, Integer> continuationMismatch = mismatchedRecordReporter.recordsNotForShard(shardId, Stream.of(event.continuationSequenceNumber()));
if (!continuationMismatch.isEmpty()) {
String continuationReport = "Continuation sequence number not matched to shard: " + mismatchedRecordReporter.makeReport(continuationMismatch);
log.error(continuationReport);
throw new IllegalArgumentException(continuationReport);
}
}

}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<artifactId>amazon-kinesis-client-pom</artifactId>
<packaging>pom</packaging>
<name>Amazon Kinesis Client Library</name>
<version>2.0.3-experimental-6</version>
<version>2.0.3-experimental-7</version>
<description>The Amazon Kinesis Client Library for Java enables Java developers to easily consume and process data
from Amazon Kinesis.
</description>
Expand Down

0 comments on commit f3b0dad

Please sign in to comment.