diff --git a/CHANGELOG.md b/CHANGELOG.md index 1df840831..14d9c28f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,76 @@ # Optimizely Java X SDK Changelog +## 2.1.4 + +December 6th, 2018 + +### Bug Fixes +* fix/wrap in try catch for getting build version in static init which might crash ([#241](https://github.com/optimizely/java-sdk/pull/241)) + +## 3.0.0-RC2 + +November 20th, 2018 + +This is the release candidate for the 3.0 SDK, which includes a number of improvements to audience targeting along with a few bug fixes. + +### New Features +* Support for number-valued and boolean-valued attributes. ([#213](https://github.com/optimizely/java-sdk/pull/213)) +* Support for audiences with new match conditions for attribute values, including “substring” and “exists” matches for strings; “greater than”, “less than”, exact, and “exists” matches for numbers; and “exact”, and “exists” matches for booleans. +* Built-in datafile version compatibility checks so that SDKs will not initialize with a newer datafile it is not compatible with. ([#209](https://github.com/optimizely/java-sdk/pull/209)) +* Audience combinations within an experiment are unofficially supported in this release. +* Refactor EventDispatcher to handle graceful shutdown via a call to AsyncEventHandler.shutdownAndAwaitTermination. + +### Breaking Changes +* Previously, notification listeners filtered non-string attribute values from the data passed to registered listeners. To support our growing list of supported attribute values, we’ve changed this behavior. Notification listeners will now post any value type passed as an attribute. Therefore, the interface of the notification listeners has changed to accept a `Map`. +* Update to use Java 1.7 ([#208](https://github.com/optimizely/java-sdk/pull/208)) + +### Bug Fixes +* refactor: Performance improvements for JacksonConfigParser ([#209](https://github.com/optimizely/java-sdk/pull/209)) +* refactor: typeAudience.combinations will not be string encoded like audience.combinations. To handle this we created a new parsing type TypedAudience. +* fix for exact match when dealing with integers and doubles. Created a new Numeric match type. +* make a copy of attributes passed in to avoid any concurrency problems. Addresses GitHub isue in Optimizely Andriod SDK. +* allow single root node for audience.conditions, typedAudience.conditions, and Experiment.audienceCombinations. + +## 3.0.0-RC + +November 7th, 2018 + +This is the release candidate for the 3.0 SDK, which includes a number of improvements to audience targeting along with a few bug fixes. + +### New Features +* Support for number-valued and boolean-valued attributes. ([#213](https://github.com/optimizely/java-sdk/pull/213)) +* Support for audiences with new match conditions for attribute values, including “substring” and “exists” matches for strings; “greater than”, “less than”, exact, and “exists” matches for numbers; and “exact”, and “exists” matches for booleans. +* Built-in datafile version compatibility checks so that SDKs will not initialize with a newer datafile it is not compatible with. ([#209](https://github.com/optimizely/java-sdk/pull/209)) +* Audience combinations within an experiment are unofficially supported in this release. + +### Breaking Changes +* Previously, notification listeners filtered non-string attribute values from the data passed to registered listeners. To support our growing list of supported attribute values, we’ve changed this behavior. Notification listeners will now post any value type passed as an attribute. Therefore, the interface of the notification listeners has changed to accept a `Map`. +* Update to use Java 1.7 ([#208](https://github.com/optimizely/java-sdk/pull/208)) + +### Bug Fixes +* refactor: Performance improvements for JacksonConfigParser ([#209](https://github.com/optimizely/java-sdk/pull/209)) +* refactor: typeAudience.combinations will not be string encoded like audience.combinations. To handle this we created a new parsing type TypedAudience. +* fix for exact match when dealing with integers and doubles. Created a new Numeric match type. +* make a copy of attributes passed in to avoid any concurrency problems. Addresses GitHub isue in Optimizely Andriod SDK. + +## 3.0.0-alpha + +October 10th, 2018 + +This is the alpha release of the 3.0 SDK, which includes a number of improvements to audience targeting along with a few bug fixes. + +### New Features +* Support for number-valued and boolean-valued attributes. ([#213](https://github.com/optimizely/java-sdk/pull/213)) +* Support for audiences with new match conditions for attribute values, including “substring” and “exists” matches for strings; “greater than”, “less than”, exact, and “exists” matches for numbers; and “exact”, and “exists” matches for booleans. +* Built-in datafile version compatibility checks so that SDKs will not initialize with a newer datafile it is not compatible with. ([#209](https://github.com/optimizely/java-sdk/pull/209)) + +### Breaking Changes +* Previously, notification listeners filtered non-string attribute values from the data passed to registered listeners. To support our growing list of supported attribute values, we’ve changed this behavior. Notification listeners will now post any value type passed as an attribute. Therefore, the interface of the notification listeners has changed to accept a `Map`. +* Update to use Java 1.7 ([#208](https://github.com/optimizely/java-sdk/pull/208)) + +### Bug Fixes +* refactor: Performance improvements for JacksonConfigParser ([#209](https://github.com/optimizely/java-sdk/pull/209)) + ## 2.1.3 September 21st, 2018 diff --git a/core-api/src/main/java/com/optimizely/ab/event/internal/BuildVersionInfo.java b/core-api/src/main/java/com/optimizely/ab/event/internal/BuildVersionInfo.java index b600dd763..97e652399 100644 --- a/core-api/src/main/java/com/optimizely/ab/event/internal/BuildVersionInfo.java +++ b/core-api/src/main/java/com/optimizely/ab/event/internal/BuildVersionInfo.java @@ -37,18 +37,22 @@ public final class BuildVersionInfo { public final static String VERSION = readVersionNumber(); private static String readVersionNumber() { - BufferedReader bufferedReader = - new BufferedReader( - new InputStreamReader(BuildVersionInfo.class.getResourceAsStream("/optimizely-build-version"), - Charset.forName("UTF-8"))); + BufferedReader bufferedReader = null; try { + bufferedReader = + new BufferedReader( + new InputStreamReader(BuildVersionInfo.class.getResourceAsStream("/optimizely-build-version"), + Charset.forName("UTF-8"))); + return bufferedReader.readLine(); } catch (Exception e) { logger.error("unable to read version number"); return "unknown"; } finally { try { - bufferedReader.close(); + if (bufferedReader != null) { + bufferedReader.close(); + } } catch (Exception e) { logger.error("unable to close reader cleanly"); }