diff options
9 files changed, 21 insertions, 8 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/SearchFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/SearchFragment.java index e43b6f314..6526be005 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/SearchFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/SearchFragment.java @@ -73,6 +73,7 @@ public class SearchFragment extends Fragment { private SearchView searchView; private Handler automaticSearchDebouncer; private long lastQueryChange = 0; + /** * Create a new SearchFragment that searches all feeds. */ diff --git a/app/src/main/java/de/danoeh/antennapod/menuhandler/FeedItemMenuHandler.java b/app/src/main/java/de/danoeh/antennapod/menuhandler/FeedItemMenuHandler.java index 23fdb86de..d9558d20f 100644 --- a/app/src/main/java/de/danoeh/antennapod/menuhandler/FeedItemMenuHandler.java +++ b/app/src/main/java/de/danoeh/antennapod/menuhandler/FeedItemMenuHandler.java @@ -120,7 +120,7 @@ public class FeedItemMenuHandler { * @return true if selectedItem is not null. */ public static boolean onPrepareMenu(Menu menu, FeedItem selectedItem, int... excludeIds) { - if (menu == null || selectedItem == null ) { + if (menu == null || selectedItem == null) { return false; } boolean rc = onPrepareMenu(menu, selectedItem); diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml index e23962381..8e82dd5e2 100644 --- a/config/checkstyle/checkstyle.xml +++ b/config/checkstyle/checkstyle.xml @@ -45,6 +45,9 @@ <module name="FallThrough"/> <module name="UpperEll"/> <module name="ModifierOrder"/> + <module name="EmptyLineSeparator"> + <property name="allowNoEmptyLineBetweenFields" value="true"/> + </module> <module name="SeparatorWrap"> <property name="id" value="SeparatorWrapDot"/> <property name="tokens" value="DOT"/> @@ -123,6 +126,7 @@ value="COMMA, SEMI, POST_INC, POST_DEC, DOT, ELLIPSIS, METHOD_REF"/> <property name="allowLineBreaks" value="true"/> </module> + <module name="ParenPad"/> <module name="AnnotationLocation"> <property name="id" value="AnnotationLocationMostCases"/> <property name="tokens" @@ -146,6 +150,9 @@ <module name="SingleLineJavadoc"> <property name="ignoreInlineTags" value="false"/> </module> + <module name="EmptyCatchBlock"> + <property name="exceptionVariableName" value="expected"/> + </module> <module name="NestedIfDepth"> <property name="max" value="4"/> </module> diff --git a/config/checkstyle/suppressions.xml b/config/checkstyle/suppressions.xml index 8ca46df67..612d582bd 100644 --- a/config/checkstyle/suppressions.xml +++ b/config/checkstyle/suppressions.xml @@ -4,4 +4,9 @@ "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd"> <suppressions> <suppress checks="MethodName" files="core/src/test/java/android/util/Log.java" /> + <suppress checks="LineLength" files="strings.xml"/> + + <suppress checks="." files="[\\/]generated-sources[\\/]"/> + <suppress checks="." files="[\\/]build[\\/]"/> + <suppress checks="." files="[\\/].idea[\\/]"/> </suppressions> diff --git a/core/src/main/java/de/danoeh/antennapod/core/backup/OpmlBackupAgent.java b/core/src/main/java/de/danoeh/antennapod/core/backup/OpmlBackupAgent.java index a7337f288..37849c296 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/backup/OpmlBackupAgent.java +++ b/core/src/main/java/de/danoeh/antennapod/core/backup/OpmlBackupAgent.java @@ -115,12 +115,7 @@ public class OpmlBackupAgent extends BackupAgentHelper { } catch (IOException e) { Log.e(TAG, "Error during backup", e); } finally { - if (writer != null) { - try { - writer.close(); - } catch (IOException e) { - } - } + IOUtils.closeQuietly(writer); } } diff --git a/core/src/main/java/de/danoeh/antennapod/core/export/CommonSymbols.java b/core/src/main/java/de/danoeh/antennapod/core/export/CommonSymbols.java index 3ed251047..2ce340328 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/export/CommonSymbols.java +++ b/core/src/main/java/de/danoeh/antennapod/core/export/CommonSymbols.java @@ -11,6 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package de.danoeh.antennapod.core.export; public class CommonSymbols { diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/download/HttpDownloader.java b/core/src/main/java/de/danoeh/antennapod/core/service/download/HttpDownloader.java index cbfb2cede..698278af9 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/download/HttpDownloader.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/download/HttpDownloader.java @@ -160,6 +160,7 @@ public class HttpDownloader extends Downloader { try { contentLength = Integer.parseInt(contentLen); } catch (NumberFormatException e) { + e.printStackTrace(); } } Log.d(TAG, "content length: " + contentLength); diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/LocalPSMP.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/LocalPSMP.java index 34fc7d699..0daa6b483 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/LocalPSMP.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/LocalPSMP.java @@ -725,7 +725,9 @@ public class LocalPSMP extends PlaybackServiceMediaPlayer { if (mediaPlayer.isPlaying()) { mediaPlayer.stop(); } - } catch (Exception ignore) { } + } catch (Exception e) { + e.printStackTrace(); + } mediaPlayer.release(); mediaPlayer = null; } diff --git a/core/src/test/java/android/util/Log.java b/core/src/test/java/android/util/Log.java index 881d10209..a65bc80fa 100644 --- a/core/src/test/java/android/util/Log.java +++ b/core/src/test/java/android/util/Log.java @@ -215,6 +215,7 @@ public final class Log { * Added for this custom Log implementation, not in android sources. */ private static final int WTF = 8; + static int wtf(int logId, String tag, String msg, Throwable tr, boolean localStack, boolean system) { return printlns(LOG_ID_MAIN, WTF, tag, msg, tr); |