fixed npe

added instance sign in for gnusocial.de
This commit is contained in:
Mariotaku Lee 2016-04-03 11:01:32 +08:00
parent b758805f0a
commit 606ff82747
3 changed files with 14 additions and 3 deletions

View File

@ -48,5 +48,15 @@
"no_version_suffix": true,
"consumer_key": "0d3f84140b97cefec01e9583d88dc760",
"consumer_secret": "da3b203278ab34eadf7e578eb2f6f9d7"
},
{
"name": "GNU Social.de",
"localized_name": "@string/provider_gnusocial_de",
"api_url_format": "https://gnusocial.de/api/",
"auth_type": "oauth",
"same_oauth_url": true,
"no_version_suffix": true,
"consumer_key": "4a81cef8ec5d896c4602d0a9b62725de",
"consumer_secret": "07e34108712788e31267a7d656242220"
}
]

View File

@ -133,9 +133,9 @@ public class JsonSerializer {
}
}
public static <E> List<E> parseList(String json, Class<E> cls) {
FileInputStream is = null;
@Nullable
public static <E> List<E> parseList(@Nullable String json, Class<E> cls) {
if (json == null) return null;
//noinspection TryFinallyCanBeTryWithResources
try {
return LoganSquareMapperFinder.mapperFor(cls).parseList(json);

View File

@ -784,6 +784,7 @@
<string name="provider_quitter_se">Quitter.se</string>
<string name="provider_loadaverage_org">LoadAverage.org</string>
<string name="provider_gnusocial_net">GNU Social.net</string>
<string name="provider_gnusocial_de">GNU Social.de</string>
<string name="new_document_api">New Document API</string>
<string name="new_document_api_summary">Open profile and media in new task</string>
<string name="drawer_toggle">Drawer toggle</string>