From 00b08318a596eef01c50005b0d42dc84665dcadc Mon Sep 17 00:00:00 2001 From: TacoTheDank Date: Wed, 18 Nov 2020 17:52:30 -0500 Subject: [PATCH] Lint: Redundant 'new' expression in constant array creation --- app/src/main/java/org/schabi/newpipe/about/AboutActivity.java | 2 +- app/src/main/java/org/schabi/newpipe/report/ErrorActivity.java | 2 +- app/src/main/java/org/schabi/newpipe/util/AnimationUtils.java | 2 +- .../main/java/us/shandian/giga/io/StoredDirectoryHelper.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java index a15bb9e41..e3e56816c 100644 --- a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java +++ b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java @@ -31,7 +31,7 @@ public class AboutActivity extends AppCompatActivity { /** * List of all software components. */ - private static final SoftwareComponent[] SOFTWARE_COMPONENTS = new SoftwareComponent[]{ + private static final SoftwareComponent[] SOFTWARE_COMPONENTS = { new SoftwareComponent("Giga Get", "2014 - 2015", "Peter Cai", "https://github.com/PaperAirplane-Dev-Team/GigaGet", StandardLicenses.GPL3), new SoftwareComponent("NewPipe Extractor", "2017 - 2020", "Christian Schabesberger", diff --git a/app/src/main/java/org/schabi/newpipe/report/ErrorActivity.java b/app/src/main/java/org/schabi/newpipe/report/ErrorActivity.java index b83f9fd97..3b7ae1d64 100644 --- a/app/src/main/java/org/schabi/newpipe/report/ErrorActivity.java +++ b/app/src/main/java/org/schabi/newpipe/report/ErrorActivity.java @@ -154,7 +154,7 @@ public class ErrorActivity extends AppCompatActivity { public static void reportError(final Context context, final CrashReportData report, final ErrorInfo errorInfo) { - final String[] el = new String[]{report.getString(ReportField.STACK_TRACE)}; + final String[] el = {report.getString(ReportField.STACK_TRACE)}; final Intent intent = new Intent(context, ErrorActivity.class); intent.putExtra(ERROR_INFO, errorInfo); diff --git a/app/src/main/java/org/schabi/newpipe/util/AnimationUtils.java b/app/src/main/java/org/schabi/newpipe/util/AnimationUtils.java index 152521018..2675c2240 100644 --- a/app/src/main/java/org/schabi/newpipe/util/AnimationUtils.java +++ b/app/src/main/java/org/schabi/newpipe/util/AnimationUtils.java @@ -157,7 +157,7 @@ public final class AnimationUtils { + "colorStart = [" + colorStart + "], colorEnd = [" + colorEnd + "]"); } - final int[][] empty = new int[][]{new int[0]}; + final int[][] empty = {new int[0]}; final ValueAnimator viewPropertyAnimator = ValueAnimator .ofObject(new ArgbEvaluator(), colorStart, colorEnd); viewPropertyAnimator.setInterpolator(new FastOutSlowInInterpolator()); diff --git a/app/src/main/java/us/shandian/giga/io/StoredDirectoryHelper.java b/app/src/main/java/us/shandian/giga/io/StoredDirectoryHelper.java index 95cce2f0a..5edc5f3ed 100644 --- a/app/src/main/java/us/shandian/giga/io/StoredDirectoryHelper.java +++ b/app/src/main/java/us/shandian/giga/io/StoredDirectoryHelper.java @@ -82,7 +82,7 @@ public class StoredDirectoryHelper { docTree.getUri(), DocumentsContract.getDocumentId(docTree.getUri()) ); - String[] projection = new String[]{COLUMN_DISPLAY_NAME}; + String[] projection = {COLUMN_DISPLAY_NAME}; String selection = "(LOWER(" + COLUMN_DISPLAY_NAME + ") LIKE ?%"; ContentResolver cr = context.getContentResolver();