Merge pull request #5656 from ByteHamster/more-checkstyle
Move more checkstyle checks from 'new code' style to main style
This commit is contained in:
commit
42e6c7fc9a
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue