use String.format instead of awkward string construction

This commit is contained in:
Mike Watters 2017-12-11 17:22:27 -07:00
parent 74aa7a5986
commit ae0b6cfccb

View file

@ -171,8 +171,9 @@ class ShardSyncer {
for (String id : inconsistentShardIds) {
ids += " " + id;
}
throw new KinesisClientLibIOException(String.valueOf(inconsistentShardIds.size()) + " open child shards (" + ids + ") are inconsistent."
+ "This can happen due to a race condition between describeStream and a reshard operation.");
throw new KinesisClientLibIOException(String.format("%d open child shards (%s) are inconsistent. "
+ "This can happen due to a race condition between describeStream and a reshard operation.",
inconsistentShardIds.size(), ids));
}
}