Skip to content

Commit

Permalink
Only log warning on main class and not extensions of
Browse files Browse the repository at this point in the history
  • Loading branch information
devoxin committed Jul 10, 2024
1 parent 32e01e2 commit 1ad791e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,15 @@ public Android() {
}

public Android(@NotNull ClientOptions options) {
this(options, true);
}

protected Android(@NotNull ClientOptions options, boolean logWarning) {
this.options = options;
log.warn("ANDROID is broken with no known fix. It is no longer advised to use this client.");

if (logWarning) {
System.out.println("ANDROID is broken with no known fix. It is no longer advised to use this client.");
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ public class AndroidLite extends Android {
.withClientField("clientVersion", "3.26.1")
.withClientField("androidSdkVersion", ANDROID_VERSION.getSdkVersion());

protected ClientOptions options;

public AndroidLite() {
this(ClientOptions.DEFAULT);
}

public AndroidLite(@NotNull ClientOptions options) {
this.options = options;
super(options, false);
}

@Override
Expand All @@ -31,12 +29,6 @@ protected ClientConfig getBaseClientConfig(@NotNull HttpInterface httpInterface)
return BASE_CONFIG.copy();
}

@Override
@NotNull
public ClientOptions getOptions() {
return this.options;
}

@Override
@NotNull
public String getIdentifier() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ public class AndroidTestsuite extends Android {
.withClientField("clientVersion", CLIENT_VERSION)
.withClientField("androidSdkVersion", ANDROID_VERSION.getSdkVersion());

protected ClientOptions options;

public AndroidTestsuite() {
this(ClientOptions.DEFAULT);
}

public AndroidTestsuite(@NotNull ClientOptions options) {
this.options = options;
super(options, false);
}

@Override
Expand All @@ -34,12 +32,6 @@ protected ClientConfig getBaseClientConfig(@NotNull HttpInterface httpInterface)
return BASE_CONFIG.copy();
}

@Override
@NotNull
public ClientOptions getOptions() {
return this.options;
}

@Override
@NotNull
public String getIdentifier() {
Expand Down

0 comments on commit 1ad791e

Please sign in to comment.