Skip to content

Commit a85dac7

Browse files
authored
chore: Prepare release branch for new release (#216)
1 parent 40ee4a0 commit a85dac7

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ cache:
2323
branches:
2424
only:
2525
- master
26-
- /^\d+\.\d+\.\d+(-SNAPSHOT|-alpha|-beta)?\d*$/ # trigger builds on tags which are semantically versioned to ship the SDK.
26+
- /^\d+\.\d+\.(\d|[x])+(-SNAPSHOT|-alpha|-beta)?\d*$/ # trigger builds on tags which are semantically versioned to ship the SDK.
2727
after_success:
2828
- ./gradlew coveralls uploadArchives --console plain

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Optimizely Java X SDK Changelog
22

3+
## 2.1.3
4+
5+
September 21st, 2018
6+
7+
### Bug Fixes
8+
* fix(attributes): Filters out attributes with null values from the event payload ([#204](https://github.com/optimizely/java-sdk/pull/204))
9+
310
## 2.1.2
411

512
August 1st, 2018

core-api/src/main/java/com/optimizely/ab/event/internal/EventFactory.java

+13-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,19 @@ public LogEvent createConversionEvent(@Nonnull ProjectConfig projectConfig,
167167
private List<Attribute> buildAttributeList(ProjectConfig projectConfig, Map<String, String> attributes) {
168168
List<Attribute> attributesList = new ArrayList<Attribute>();
169169

170-
for (Map.Entry<String, String> entry : attributes.entrySet()) {
170+
for (Map.Entry<String, ?> entry : attributes.entrySet()) {
171+
// Filter down to the types of values we're allowed to track.
172+
// Don't allow Longs, BigIntegers, or BigDecimals - they /can/ theoretically be serialized as JSON numbers
173+
// but may take on values that can't be faithfully parsed by the backend.
174+
// https://developers.optimizely.com/x/events/api/#Attribute
175+
if (entry.getValue() == null ||
176+
!((entry.getValue() instanceof String) ||
177+
(entry.getValue() instanceof Integer) ||
178+
(entry.getValue() instanceof Double) ||
179+
(entry.getValue() instanceof Boolean))) {
180+
continue;
181+
}
182+
171183
String attributeId = projectConfig.getAttributeId(projectConfig, entry.getKey());
172184
if(attributeId == null) {
173185
continue;

0 commit comments

Comments
 (0)