Skip to content

Commit

Permalink
Releasing version 2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
LaunchDarklyReleaseBot committed Jan 6, 2022
1 parent e3ed2ad commit 60665a2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@

All notable changes to the LaunchDarkly EventSource implementation for Java will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).

## [2.4.0] - 2022-01-06
This release fixes a number of SSE spec compliance issues which do not affect usage in the LaunchDarkly Java and Android SDKs, but could be relevant in other use cases.

### Added:
- `EventSource.Builder.readBufferSize`

### Changed:
- The implementation of stream parsing has been changed. Previously, we were using `BufferedSource` from the `okio` library, but that API did not support `\r` line terminators (see below). Now we use our own implementation, which is simpler than `BufferedSource` and is optimized for reading text lines in UTF-8.
- The CI build now incorporates the cross-platform contract tests defined in https://github.com/launchdarkly/sse-contract-tests to ensure consistent test coverage across different LaunchDarkly SSE implementations.

### Fixed:
- The stream parser did not support a `\r` character by itself as a line terminator. The SSE specification requires that `\r`, `\n`, and `\r\n` are all valid.
- If an event's `id:` field contains a null character, the whole field should be ignored.
- The parser was incorrectly trimming spaces from lines that did not contain a colon, so for instance `data[space]` was being treated as an empty `data` field, when it is really an invalid field name that should be ignored.

## [2.3.2] - 2021-06-24
### Fixed:
- Fixed a bug that caused the connection error handler to be called twice instead of once, with only the second return value being used. The second call would always pass an `EOFException` instead of the original error. The result was that any connection error handler logic that needed to distinguish between different kinds of errors would not work as intended.
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=2.3.2
version=2.4.0
ossrhUsername=
ossrhPassword=

Expand Down

0 comments on commit 60665a2

Please sign in to comment.