Skip to content

Commit

Permalink
Revert "[ch57098] Deprecate LDCountryCode (#141)" so we can do a patc…
Browse files Browse the repository at this point in the history
…h release

first.

This reverts commit c0e71ae.
  • Loading branch information
gwhelanLD committed Jan 3, 2020
1 parent ea19a16 commit 23b930f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@
*
* @author Takahiko Kawasaki
*/
@SuppressWarnings({"deprecation", "DeprecatedIsStillUsed"})
@Deprecated
public enum LDCountryCode {
/**
* <a href="http://en.wikipedia.org/wiki/Ascension_Island">Ascension Island</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ public static class Builder {
private String email;
private String name;
private String avatar;
@SuppressWarnings("deprecation")
private LDCountryCode country;

private final Map<String, JsonElement> custom;
Expand All @@ -233,7 +232,6 @@ public Builder(String key) {
privateAttributeNames = new HashSet<>();
}

@SuppressWarnings("deprecation")
public Builder(LDUser user) {
this.key = user.getKey();
this.anonymous = user.getAnonymous();
Expand Down Expand Up @@ -284,12 +282,10 @@ public Builder privateSecondary(String s) {
}

/**
* Set the country for a user. In 2.x.x the SDK will attempt to look the country up as a <a
* Set the country for a user. The country should be a valid <a
* href="http://en.wikipedia.org/wiki/ISO_3166-1">ISO 3166-1</a> alpha-2 or alpha-3 code. If
* it is not a valid ISO-3166-1 code, an attempt will be made to look up the country by its
* name. If that fails, a warning will be logged, and the country will not be set. In the
* next major release (3.0.0) the SDK will not attempt attempt this lookup, and instead
* treat the country field as a normal String.
* name. If that fails, a warning will be logged, and the country will not be set.
*
* @param s the country for the user
* @return the builder
Expand All @@ -300,12 +296,11 @@ public Builder country(String s) {
}

/**
* Set the country for a user. In 2.x.x the SDK will attempt to look the country up as a <a
* Set the country for a user. The country should be a valid <a
* href="http://en.wikipedia.org/wiki/ISO_3166-1">ISO 3166-1</a> alpha-2 or alpha-3 code. If
* it is not a valid ISO-3166-1 code, an attempt will be made to look up the country by its
* name. If that fails, a warning will be logged, and the country will not be set. In the
* next major release (3.0.0) the SDK will not attempt attempt this lookup, and instead
* treat the country field as a normal String. Private attributes are not recorded in events.
* name. If that fails, a warning will be logged, and the country will not be set. Private
* attributes are not recorded in events.
*
* @param s the country for the user
* @return the builder
Expand All @@ -315,8 +310,6 @@ public Builder privateCountry(String s) {
return country(s);
}


@SuppressWarnings("deprecation")
private LDCountryCode countryCode(String s) {
LDCountryCode countryCode = LDCountryCode.getByCode(s, false);

Expand Down Expand Up @@ -348,11 +341,7 @@ private LDCountryCode countryCode(String s) {
*
* @param country the country for the user
* @return the builder
* @deprecated As of version 2.9.1, in 3.0.0 the SDK will no longer include the
* LDCountryCode class. Applications should use {@link #country(String)} instead.
* */
@Deprecated
@SuppressWarnings("deprecation")
*/
public Builder country(LDCountryCode country) {
this.country = country;
return this;
Expand All @@ -363,11 +352,7 @@ public Builder country(LDCountryCode country) {
*
* @param country the country for the user
* @return the builder
* @deprecated As of version 2.9.1, in 3.0.0 the SDK will no longer include the
* LDCountryCode class. Applications should use {@link #privateCountry(String)} instead.
*/
@Deprecated
@SuppressWarnings("deprecation")
public Builder privateCountry(LDCountryCode country) {
privateAttributeNames.add(COUNTRY);
return country(country);
Expand Down

0 comments on commit 23b930f

Please sign in to comment.