Amend string check

This commit is contained in:
Cj Malone 2016-07-25 17:27:06 +01:00
parent 0dfa36953b
commit 74e6b7476d
1 changed files with 3 additions and 4 deletions

View File

@ -41,7 +41,9 @@ public class NSMedia extends Namespace {
String type = attributes.getValue(MIME_TYPE);
String defaultStr = attributes.getValue(DEFAULT);
boolean validType;
boolean isDefault = false;
boolean isDefault = "true".equals(defaultStr);
if (SyndTypeUtils.enclosureTypeValid(type)) {
validType = true;
} else {
@ -49,9 +51,6 @@ public class NSMedia extends Namespace {
validType = type != null;
}
if (defaultStr == "true")
isDefault = true;
if (state.getCurrentItem() != null &&
(state.getCurrentItem().getMedia() == null || isDefault) &&
url != null && validType) {