-
Notifications
You must be signed in to change notification settings - Fork 32
Audiences, Attributes and Events implementation #438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ed55d43
ebf3a7b
a5eb5c9
13c5a96
5b83801
0aa4ad4
4fa26dd
d064f8d
346b458
3c71919
5413845
0c84679
6ff39a4
83c32e1
725e8a7
5f0de11
48a1b42
b1fd2b5
f3b3d25
707a348
1a48ad7
d0bf1c6
dddcedf
4b50774
1da6305
f09fe7a
a8c4aab
7baef32
5df424e
011a6d4
974ea93
272bbe1
ec15d25
5fccddf
ff0e4ad
d382c3d
d63441c
ae7b43c
ed83db4
9830de1
c9d9dca
7613fde
5bbe711
a7766d0
8e737dd
fe32f57
c7a9fcb
52220b7
3146e9d
fc7fab5
4e9c2fa
035cca9
c2efd87
39943ed
3993335
c439a2f
48dda4f
efd1383
20683c7
d5d5383
41e8e2b
a877930
f79f199
04d1fb9
89722b7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,19 +119,39 @@ public Boolean evaluate(ProjectConfig config, Map<String, ?> attributes) { | |
} | ||
|
||
@Override | ||
public String toString() { | ||
public String getOperandOrId() { | ||
return null; | ||
} | ||
|
||
public String getValueStr() { | ||
final String valueStr; | ||
if (value == null) { | ||
valueStr = "null"; | ||
} else if (value instanceof String) { | ||
valueStr = String.format("'%s'", value); | ||
valueStr = String.format("%s", value); | ||
} else { | ||
valueStr = value.toString(); | ||
} | ||
return valueStr; | ||
} | ||
|
||
@Override | ||
public String toJson() { | ||
StringBuilder attributes = new StringBuilder(); | ||
if (name != null) attributes.append("{\"name\":\"" + name + "\""); | ||
if (type != null) attributes.append(", \"type\":\"" + type + "\""); | ||
if (match != null) attributes.append(", \"match\":\"" + match + "\""); | ||
attributes.append(", \"value\":" + ((value instanceof String) ? ("\"" + getValueStr() + "\"") : getValueStr()) + "}"); | ||
|
||
return attributes.toString(); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "{name='" + name + "\'" + | ||
", type='" + type + "\'" + | ||
", match='" + match + "\'" + | ||
", value=" + valueStr + | ||
", value=" + ((value instanceof String) ? ("'" + getValueStr() + "'") : getValueStr()) + | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why single quote here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was part of the original logic that I didn't want to change (Line 127) but don't need for the function above and wanted to reuse the same code minus those quotes. We can chat offline if you like. |
||
"}"; | ||
} | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.