Merge pull request #1221 from nextcloud/fixPropertiesParsing

Properly parse encryption/favorite flags
This commit is contained in:
Andy Scherzinger 2021-05-06 16:23:19 +02:00 committed by GitHub
commit bf1b4f97b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,7 @@ public class NCEncrypted implements Property {
try {
String text = XmlUtils.INSTANCE.readText(xmlPullParser);
if (!TextUtils.isEmpty(text)) {
return new NCEncrypted(Boolean.parseBoolean(text));
return new NCEncrypted("1".equals(text));
}
} catch (IOException | XmlPullParserException e) {
Log.e("NCEncrypted", "failed to create property", e);

View File

@ -61,7 +61,7 @@ public class OCFavorite implements Property {
try {
String text = XmlUtils.INSTANCE.readText(xmlPullParser);
if (!TextUtils.isEmpty(text)) {
return new OCFavorite(Boolean.parseBoolean(text));
return new OCFavorite("1".equals(text));
}
} catch (IOException | XmlPullParserException e) {
Log.e("OCFavorite", "failed to create property", e);