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 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) {
|
||||
|
|
Loading…
Reference in New Issue