mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Fixing codacy issues. Reduced reported count from 550 to 518.
This commit is contained in:
parent
9b8d8e9b7c
commit
fc9cd0a3b7
13 changed files with 51 additions and 41 deletions
|
|
@ -242,9 +242,9 @@ public class Utils {
|
|||
public static boolean xmlFastForward(XmlPullParser parser, String namespace, String element) {
|
||||
try {
|
||||
while (parser.next() != XmlPullParser.END_DOCUMENT) {
|
||||
if (parser.getEventType() == XmlPullParser.START_TAG &&
|
||||
parser.getNamespace().equals(namespace) &&
|
||||
parser.getName().equals(element)) {
|
||||
if (parser.getEventType() == XmlPullParser.START_TAG
|
||||
&& parser.getNamespace().equals(namespace)
|
||||
&& parser.getName().equals(element)) {
|
||||
// We found it!
|
||||
return true;
|
||||
}
|
||||
|
|
@ -267,7 +267,8 @@ public class Utils {
|
|||
extension = "jpg";
|
||||
}
|
||||
title = jpegPattern.matcher(title).replaceFirst(".jpg");
|
||||
if (extension != null && !title.toLowerCase(Locale.getDefault()).endsWith("." + extension.toLowerCase(Locale.ENGLISH))) {
|
||||
if (extension != null && !title.toLowerCase(Locale.getDefault())
|
||||
.endsWith("." + extension.toLowerCase(Locale.ENGLISH))) {
|
||||
title += "." + extension;
|
||||
}
|
||||
return title;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue