Skip to content

Commit

Permalink
Merge pull request #201 from droibit/feature/refactoring
Browse files Browse the repository at this point in the history
Refactor code to suppress deprecation warnings
  • Loading branch information
droibit committed Jul 25, 2024
2 parents 892d414 + 103729a commit ef0d092
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ public void closeAllIfPossible() {
/**
* @noinspection SameParameterValue
*/
@SuppressWarnings("deprecation")
private static @Nullable ResolveInfo resolveService(
@NonNull PackageManager pm,
@NonNull Intent intent,
Expand All @@ -150,7 +151,6 @@ public void closeAllIfPossible() {
PackageManager.ResolveInfoFlags.of(flags)
);
} else {
//noinspection deprecation
return pm.resolveService(intent, flags);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ public Builder() {
}

/**
* @noinspection DataFlowIssue, unchecked
* @noinspection DataFlowIssue
*/
@SuppressWarnings("unchecked")
public @NonNull Builder setOptions(@Nullable Map<String, Object> options) {
if (options == null) {
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ public static class Builder {
public Builder() {
}

/**
* @noinspection unchecked
*/
@SuppressWarnings("unchecked")
public @NonNull Builder setOptions(@NonNull Map<String, Object> options) {
if (options.containsKey(KEY_COLOR_SCHEME)) {
colorScheme = (Integer) options.get(KEY_COLOR_SCHEME);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ public Builder() {
}

/**
* @noinspection unchecked, DataFlowIssue
* @noinspection DataFlowIssue
*/
@SuppressWarnings("unchecked")
public @NonNull Builder setOptions(@NonNull Map<String, Object> options) {
if (options.containsKey(KEY_COLOR_SCHEMES)) {
colorSchemes = new CustomTabsColorSchemes.Builder()
Expand Down

0 comments on commit ef0d092

Please sign in to comment.