mirror of
https://github.com/TwidereProject/Twidere-Android
synced 2025-02-02 09:46:51 +01:00
Remove redundant suppressions
This commit is contained in:
parent
d6a60ba638
commit
5072e34900
@ -37,7 +37,6 @@ import java.util.List;
|
||||
@Keep
|
||||
public class IDs$$JsonObjectMapper extends JsonMapper<IDs> {
|
||||
|
||||
@SuppressWarnings("TryWithIdenticalCatches")
|
||||
@Override
|
||||
public IDs parse(JsonParser jsonParser) throws IOException {
|
||||
IDs instance = new IDs();
|
||||
|
@ -56,6 +56,5 @@ public @interface FilterScope {
|
||||
|
||||
// Contains all flags
|
||||
int ALL = 0xFFFFFFFF;
|
||||
@SuppressWarnings("PointlessBitwiseExpression")
|
||||
int DEFAULT = ALL & ~(TARGET_NAME | TARGET_DESCRIPTION);
|
||||
}
|
||||
|
@ -40,7 +40,6 @@ import java.util.Arrays;
|
||||
@JsonObject
|
||||
@ParcelablePlease
|
||||
public class ParcelableMedia implements Parcelable {
|
||||
@SuppressWarnings("NullableProblems")
|
||||
@NonNull
|
||||
@JsonField(name = "url")
|
||||
@ParcelableThisPlease
|
||||
|
@ -31,7 +31,6 @@ import com.hannesdorfmann.parcelableplease.annotation.ParcelablePlease;
|
||||
@ParcelablePlease
|
||||
public class ParcelableMediaUpdate implements Parcelable {
|
||||
|
||||
@SuppressWarnings("NullableProblems")
|
||||
@NonNull
|
||||
@JsonField(name = "uri")
|
||||
public String uri;
|
||||
|
@ -75,13 +75,11 @@ public class ParcelableStatus implements Parcelable, Comparable<ParcelableStatus
|
||||
@CursorField(value = Statuses._ID, excludeWrite = true, type = TwidereDataStore.TYPE_PRIMARY_KEY)
|
||||
public long _id;
|
||||
|
||||
@SuppressWarnings("NullableProblems")
|
||||
@JsonField(name = "id")
|
||||
@CursorField(Statuses.ID)
|
||||
@NonNull
|
||||
public String id;
|
||||
|
||||
@SuppressWarnings("NullableProblems")
|
||||
@JsonField(name = "account_id", typeConverter = UserKeyConverter.class)
|
||||
@CursorField(value = Statuses.ACCOUNT_KEY, converter = UserKeyCursorFieldConverter.class)
|
||||
@NonNull
|
||||
@ -98,7 +96,6 @@ public class ParcelableStatus implements Parcelable, Comparable<ParcelableStatus
|
||||
@JsonField(name = "timestamp")
|
||||
@CursorField(Statuses.TIMESTAMP)
|
||||
public long timestamp;
|
||||
@SuppressWarnings("NullableProblems")
|
||||
|
||||
@JsonField(name = "user_id", typeConverter = UserKeyConverter.class)
|
||||
@CursorField(value = Statuses.USER_KEY, converter = UserKeyCursorFieldConverter.class)
|
||||
|
@ -41,7 +41,6 @@ import java.util.Arrays;
|
||||
@JsonObject
|
||||
public class ParcelableStatusUpdate implements Parcelable {
|
||||
|
||||
@SuppressWarnings("NullableProblems")
|
||||
@JsonField(name = "accounts")
|
||||
@NonNull
|
||||
@ParcelableThisPlease
|
||||
|
@ -45,7 +45,6 @@ public class ParcelableTrend implements Parcelable {
|
||||
|
||||
@CursorField(value = CachedTrends._ID, excludeWrite = true, type = TwidereDataStore.TYPE_PRIMARY_KEY)
|
||||
long _id;
|
||||
@SuppressWarnings("NullableProblems")
|
||||
@ParcelableThisPlease
|
||||
@JsonField(name = "account_id", typeConverter = UserKeyConverter.class)
|
||||
@CursorField(value = CachedTrends.ACCOUNT_KEY, converter = UserKeyCursorFieldConverter.class)
|
||||
|
@ -64,7 +64,6 @@ public class ThemedListPreferenceDialogFragmentCompat extends ThemedPreferenceDi
|
||||
* click-on-an-item dismiss the dialog instead of the user having to
|
||||
* press 'Ok'.
|
||||
*/
|
||||
//noinspection ConstantConditions
|
||||
builder.setPositiveButton(null, null);
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,6 @@ public class ObjectCursorLoader<T> extends FixedAsyncTaskLoader<List<T>> {
|
||||
return new ObjectCursor<>(cursor, indices, mUseCache);
|
||||
}
|
||||
|
||||
@SuppressWarnings("TryWithIdenticalCatches")
|
||||
@NonNull
|
||||
private ObjectCursor.CursorIndices<T> createIndices(final Cursor cursor) {
|
||||
return ObjectCursor.indicesFrom(cursor, mObjectClass);
|
||||
|
@ -136,10 +136,8 @@ public final class ViewSupport {
|
||||
|
||||
static void setForeground(final View view, final Drawable foreground) {
|
||||
if (view instanceof FrameLayout) {
|
||||
//noinspection RedundantCast
|
||||
((FrameLayout) view).setForeground(foreground);
|
||||
} else if (view instanceof IForegroundView) {
|
||||
//noinspection RedundantCast
|
||||
((IForegroundView) view).setForeground(foreground);
|
||||
}
|
||||
}
|
||||
|
@ -83,7 +83,6 @@ public final class BirthdayView extends LayeredCanvasView {
|
||||
((AnimatedBitmapLayer) layers[2]).setScale(Math.max(1, w / 160));
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
protected boolean fitSystemWindows(@NonNull Rect insets) {
|
||||
final int stripTop = Utils.INSTANCE.getInsetsTopWithoutActionBarHeight(getContext(), insets.top);
|
||||
|
@ -33,7 +33,6 @@ import java.util.regex.Pattern;
|
||||
*
|
||||
* @author George T. Steel
|
||||
*/
|
||||
@SuppressWarnings("IfCanBeSwitch")
|
||||
public class SpanFormatter {
|
||||
public static final Pattern FORMAT_SEQUENCE = Pattern.compile("%([0-9]+\\$|<?)([^a-zA-z%]*)([[a-zA-Z%]&&[^tT]]|[tT][a-zA-Z])");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user