Amend string check
This commit is contained in:
parent
0dfa36953b
commit
74e6b7476d
@ -41,7 +41,9 @@ public class NSMedia extends Namespace {
|
|||||||
String type = attributes.getValue(MIME_TYPE);
|
String type = attributes.getValue(MIME_TYPE);
|
||||||
String defaultStr = attributes.getValue(DEFAULT);
|
String defaultStr = attributes.getValue(DEFAULT);
|
||||||
boolean validType;
|
boolean validType;
|
||||||
boolean isDefault = false;
|
|
||||||
|
boolean isDefault = "true".equals(defaultStr);
|
||||||
|
|
||||||
if (SyndTypeUtils.enclosureTypeValid(type)) {
|
if (SyndTypeUtils.enclosureTypeValid(type)) {
|
||||||
validType = true;
|
validType = true;
|
||||||
} else {
|
} else {
|
||||||
@ -49,9 +51,6 @@ public class NSMedia extends Namespace {
|
|||||||
validType = type != null;
|
validType = type != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defaultStr == "true")
|
|
||||||
isDefault = true;
|
|
||||||
|
|
||||||
if (state.getCurrentItem() != null &&
|
if (state.getCurrentItem() != null &&
|
||||||
(state.getCurrentItem().getMedia() == null || isDefault) &&
|
(state.getCurrentItem().getMedia() == null || isDefault) &&
|
||||||
url != null && validType) {
|
url != null && validType) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user